ODBC Server Reference Manual
CORE SQL Language
HP NonStop ODBC Server Reference Manual—429151-002
3-54
SELECT
SELECT
Use SELECT to retrieve rows from database tables or to access rows for use in
updating columns in the same or another table. The SELECT statement has two forms:
the standard SELECT and SELECT for update.
Standard SELECT
The SELECT statement has the following syntax:
SELECT [ ALL ] select-item [, select-item ] ...
[ DISTINCT ]
FROM table-reference-list
[ WHERE search-condition ]
[ GROUP BY column-identifier | column-alias
[,column-identifier | column-alias ] ... ]
[ HAVING search-condition ]
[ UNION query-specification ]
[ ORDER BY sort-specification [, sort-specification ] ... ]
select-item is:
{ [ table-name ] * }
{ [ correlation-name ] }
{ }
{ [ table-name ] column-identifier }
{ [correlation-name ] }
{ }
{ expression }
{ }
table-reference-list is:
table-reference [‚ table-reference ] ...