Vous êtes sur la page 1sur 2

SQL is short for Structured Query Language and is a widely used database language, providing means of data manipulation

(store, retrieve, update, delete) and database creation. Almost all modern Relational Database Management Systems like MS SQL Server, Microsoft Access, MSDE, Oracle, DB2, Sybase, MySQL, Postgres and Informix use SQL as standard database language. Now a word of warning here, although all those RDBMS use SQL, they use different SQL dialects. For example MS SQL Server specific version of the SQL is called TSQL, Oracle version of SQL is called PL/SQL, MS Access version of SQL is called JET SQL, etc.

Our SQL tutorial will teach you how to use commonly used SQL commands and you will be able to apply most of the knowledge gathered from this SQL tutorial to any of the databases above. he SQL SELECT statement is used to select
data from a SQL database table. This is usually the very first SQL command every SQL newbie learns and this is because the SELECT SQL statement is one of the most used SQL commands. Please have a look at the general SQL SELECT syntax:

SELECT Column1, Column2, Column3, FROM Table1

The list of column names after the SQL SELECT command determines which columns you want to be returned in your result set. If you want to select all columns from a database table, you can use the following SQL statement:

SELECT * FROM Table1

When the list of columns following the SELECT SQL command is replaced with asterix (*) all table columns are returned. Word of caution here, its always better to explicitly specify the columns in the SELECT list, as this will improve your query performance significantly. The table name following the SQL FROM keyword (in our case Table1) tells the SQL interpreter which table to use to retrieve the data. The foundation of every Relational Database Management System is a database object called table. Every database consists of one or more tables, which store the databases data/information. Each table has its own unique name and consists of columns and rows. The database table columns (called also table fields) have their own unique names and have a pre-defined data types. Table columns can have various attributes defining the column functionality (the column is a primary key, there is an index defined on the column, the column has certain default value, etc.). While table columns describe the data types, the table rows contain the actual data for the columns. Here is an example of a simple database table, containing customers data. The first row, listed in bold, contains the names of the table columns: Table: Customers FirstName John Steven Paula James LastName Smith Goldfish Brown Smith Email John.Smith@yahoo.com goldfish@fishhere.net pb@herowndomain.org jim@supergig.co.uk DOB 2/4/1968 4/4/1974 5/24/1978 20/10/1980 Phone 626 222-2222 323 455-4545 416 323-3232 416 323-8888

Vous aimerez peut-être aussi