You use the SQL SELECT statement to read data from a database. The SQL statement has the following general syntax:
SELECTcolumn_names
FROMtable_names
[ WHEREsearch_condition
]
[ GROUP BYgroup_expression
] [HAVINGcondition
]
[ ORDER BYorder_condition
[ ASC | DESC ] ]
The statements in square brackets are optional.
Note: There are additional options to SELECT depending on your database. For a complete syntax description for SELECT, see the product documentation.
This section describes options to the SELECT statement.