SQL Procedure

SELECT Statement

Selects columns and rows of data from tables and views.

Restriction: The clauses in the SELECT statement must appear in the order shown.
See: SQL SELECT Statement Clauses
table-expression
query-expression

Syntax

SELECT <DISTINCT> object-item <, …object-item>
<INTO macro-variable-specification <, … macro-variable-specification>>
FROM from-list
<WHERE sql-expression>
<GROUP BY group-by-item <, … group-by-item>>
<HAVING sql-expression>
<ORDER BY order-by-item <, … order-by-item>>;