Saturday, August 27, 2011

SQl Select.

Learn how to use the SELECT statement to pull data from a SQL database table.


The SQL SELECT statement is used to select data from a SQL database table.This Command is the most frequently used command because every sql command retrieving data from a SQl database will  use this command.

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 in which we replace column names with "*" symbol which select all the columns from the table.

SELECT *
FROM Table1

 it is always better to explicitly specify the columns in the SELECT list, as this will improve your query performance significantly. 

The table name following  "from" will determine which table to be used to retrieve data .


MORE BASIC SQL COMMANDS

No comments:

Post a Comment