ODBC Server Reference Manual

Transact-SQL Language
HP NonStop ODBC Server Reference Manual429151-002
4-84
Examples
Examples
The following statement retrieves all rows and all columns from the EMPLOYEE table:
select * from employee
The following statement retrieves all rows from the EMPLOYEE table, and specifies
alternate column headings to be displayed:
select
enum = empnum,
first_name,
last_name,
dept = deptnum,
salary
from employee
The following statement retrieves all employees in department 1030:
select * from employee
where deptnum = 1030
The preceding syntax diagram shows the entire syntax of the SELECT statement. The
following syntax diagrams show the syntax of each primary clause.
comp-list is:
aggregate(column-name) [ , aggregate(column-name) ] ...
table-reference is:
[ [database.]owner. ] { table-name }
{ view-name }