ODBC Server Reference Manual
CORE SQL Language
HP NonStop ODBC Server Reference Manual—429151-002
3-57
Examples
FROM Clause
The FROM clause of the SELECT statement specifies the tables and views used in the
SELECT statement; it has the following syntax:
table-name
identifies a table or view used in the SELECT statement. The table-name or
view-name can be qualified with the database name and owner name.
correlation-name
is a name that identifies the table or view for use within the SELECT statement.
Each correlation-name in the FROM clause must be unique.
outer-join
is an ODBC extension that permits return of rows from a table even if no matching
rows exist in the other table. See Escape Clauses on page 3-11.
Note that, unlike NonStop SQL, outer joins are nested. That is, the first ON clause
is matched with the second outer join and the second ON clause is matched with
the first outer join.
WHERE Clause
The WHERE clause of the SELECT statement specifies a search condition to be
applied to each row of the FROM clause result table; it has the following syntax:
Search conditions are described under Language Elements on page 3-2.
table-reference is
table-name [ correlation-name ] | outer-join-extension
outer-join-extension is
{ OJ outer-join } | outer-join
outer-join is
table-name [ correlation-name ] LEFT [OUTER] JOIN
oj-table-reference
ON search-condition
oj-table-reference is table-name [ correlation-name ] | outer-
join
WHERE search-condition