Saturday, 12 February 2011

SQL

SQL
SELECT Company, Country FROM Customers WHERE Country <> 'UK'


SELECT * FROM contacts_table


SELECT column_name(s)
FROM table_name


SELECT * FROM table_name


SELECT LastName,FirstName FROM contacts_table


SELECT * FROM contacts_table


SELECT DISTINCT column_name(s)
FROM table_name


SELECT DISTINCT City FROM contacts_table


SELECT column_name(s)
FROM table_name
WHERE column_name operator value


SELECT * FROM contacts_table
WHERE City='Maidstone'


SELECT * FROM contacts_table WHERE FirstName='James'


SELECT * FROM contacts_table WHERE Year=1973


SELECT * FROM contacts_table
WHERE FirstName='James'
AND LastName='Snyder'


SELECT * FROM contacts_table
WHERE FirstName='James'
OR FirstName='Michael'


SELECT * FROM contacts_table WHERE
LastName='Snyder'
AND (FirstName='James' OR FirstName='Michael')


SELECT column_name(s)
FROM table_name
ORDER BY column_name(s) ASC|DESC


SELECT * FROM contacts_table
ORDER BY LastName


SELECT * FROM contacts_table
ORDER BY LastName DESC


INSERT INTO table_name
VALUES (value1, value2, value3,...)


INSERT INTO table_name (column1, column2, column3,...)
VALUES (value1, value2, value3,...)


INSERT INTO contacts_table
VALUES (4,'John', 'Anthony', 'Wendy', 'James')


INSERT INTO contacts_table (Id, LastName, FirstName)
VALUES (5, 'Sarah', 'Joanna')


UPDATE table_name
SET column1=value, column2=value2,...
WHERE some_column=some_value


UPDATE contacts_table
SET Address='Le Mont Sur Lausanne', City='Lausanne'
WHERE LastName='Snyder' AND FirstName='Joanna'


DELETE FROM table_name
WHERE some_column=some_value


DELETE FROM contacts_table
WHERE LastName='Snyder' AND FirstName='Joanna'


DELETE FROM table_name
DELETE * FROM table_name

3 comments:

Anonymous said...

There are a lot of parameters that can make a significant difference in the performance and capability of each part of LAMP. You need someone who specialises in each of the programs that make up LAMP.

E.g. If apache finds a .htconf file in a directory, it will search each of the subdirectories for another .htconf each time any file is accessed. The rules in the .htconf should be placed in the main apache config file.

Anonymous said...

good well established OSS

Anonymous said...

WAMP server app:
From Romain Bourdon:
The WampServer (Formerly WAMP5) application was designed to be a Windows Web development environment. It allows you to create Web applications with Apache, PHP, and the MySQL database. It also comes with PHPMyAdmin and SQLiteManager to easily manage your databases. WampServer installs automatically (installer), and its usage is very intuitive. You will be able to tune your server without even touching the setting files. WampServer is the only packaged solution that will allow you to reproduce your production server. Once WampServer is installed, you have the possibility to add as many Apache, MySQL, and PHP releases as you want. WampServer also has a trayicon to manage your server and its settings.
What's new in this version:
Version 2.0i using PHP 5.3.0, MySQL 5.1.36, PHPMyAdmin 3.2.0.1, corrected a bug with php.ini file, and the PHP log file has been deactivated.

WAMP Developer app:
From DeveloperSide.NET:
The Web-Developer Server Suite is an open-source/non-proprietary, WAMP-based [Windows, Apache, MySQL, PHP] Web-server distribution for Windows that is fully configured and ready to run. Suitable for both beginners and professionals, a complete turnkey solution is provided that is capable of creating and deploying a personal Website for the average individual, or an Internet presence for a business. Create, test, publish, and maintain your Website in-house, on your local system, where you are in full control.