HP Neoview SQL Reference Manual page 170

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

table-ref LEFT JOIN table-ref join-spec
joins rows that satisfy the condition in the join-spec clause, plus rows from the
left table-ref that do not satisfy the condition.
table-ref RIGHT JOIN table-ref join-spec
joins rows that satisfy the condition in the join-spec clause, plus rows from the
right table-ref that do not satisfy the condition.
table-ref FULL OUTER JOIN table-ref join-spec
combines the results of both left and right outer joins. These joins show records from
both tables and fill in NULLs for missing matches on either side
simple-table
A simple-table can be specified as:
VALUES (row-value-const) [,(row-value-const)]...
| TABLE table
| query-specification
A simple-table can be a table value constructor. It starts with the VALUES keyword
followed by a sequence of row value constructors, each of which is enclosed in parentheses.
A row-value-const is a list of expressions (or NULL) or a row subquery (a subquery that
returns a single row of column values). An operand of an expression cannot reference a
column (except when the operand is a scalar subquery returning a single column value in
its result table).
The use of NULL as a row-value-const element is a Neoview SQL extension.
A simple-table can be specified by using the TABLE keyword followed by a table name,
which is equivalent to the query specification SELECT * FROM table.
A simple-table can be a query-specification—that is, a SELECT statement consisting
of SELECT ... FROM ... with optionally the WHERE, SAMPLE, TRANSPOSE, SEQUENCE
BY, GROUP BY, and HAVING clauses.
WHERE search-condition
specifies a search-condition for selecting rows. See
WHERE clause cannot contain an aggregate (set) function.
The search-condition is applied to each row of the result table derived from the table
reference in the FROM clause or, in the case of multiple table references, the cross-product
of result tables derived from the individual table references.
Each column you specify in search-condition is typically a column in this intermediate
result table. In the case of nested subqueries used to provide comparison values, the column
can also be an outer reference.
To comply with ANSI standards, Neoview SQL does not move aggregate predicates from
the WHERE clause to a HAVING clause and does not move non-aggregate predicates from
the HAVING clause to the WHERE clause.
SAMPLE sampling-method
specifies the sampling method used to select a subset of the intermediate result table of a
SELECT statement. Each of the methods uses a sampling size. The three sampling
methods—random, first, and periodic—are specified as:
RANDOM percent-size
directs Neoview SQL to choose rows randomly (each row having an unbiased probability
of being chosen) without replacement from the result table. The sampling size is
determined by using a percent of the result table.
FIRST rows-size [SORT BY colname [,colname]...]
directs Neoview SQL to choose the first rows-size rows from the sorted result table.
The sampling size is determined by using the specified number of rows.
170
SQL Statements
See"Subquery" (page
"Search Condition" (page
307).
305). The

Advertisement

Table of Contents
loading

Table of Contents