SELECT Statement
SELECT Statement
The SELECT statement is used to select data from a database.
The result is stored in a result table, which is called the result-set.
A query may retrieve information from selected columns or from all columns in the table.
To create a simple SELECT statement, specify the name(s) of the column(s) you need from the table.
Syntax of the SQL SELECT Statement:
SELECT column_list
FROM table_name
- column_list includes one or more columns from which data is retrieved
- table-name is the name of the table from which the information is retrieved
Below is the data from our customers table:
The following SQL statement selects the FirstName from the customers table:
SELECT FirstName FROM customers
The SELECT statement is used to select data from a database.
The result is stored in a result table, which is called the result-set.
A query may retrieve information from selected columns or from all columns in the table.
To create a simple SELECT statement, specify the name(s) of the column(s) you need from the table.
Syntax of the SQL SELECT Statement:
SELECT column_list
FROM table_name
- column_list includes one or more columns from which data is retrieved
- table-name is the name of the table from which the information is retrieved
Below is the data from our customers table:
The following SQL statement selects the FirstName from the customers table:
SELECT FirstName FROM customers
Comments
Post a Comment