Syntax Description Of Select - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

THEN percent-result PERCENT [ROWS]
[WHEN condition THEN percent-result PERCENT [ROWS]]...
[ELSE percent-result PERCENT [ROWS]] END
rows-size is:
number-rows ROWS
| BALANCE WHEN condition THEN number-rows ROWS
[WHEN condition THEN number-rows ROWS]...
[ELSE number-rows ROWS] END
transpose-set is:
transpose-item-list AS transpose-col-list
transpose-item-list is:
expression-list | (expression-list) [,(expression-list)]...
expression-list is:
expression [,expression]...
transpose-col-list is:
colname | (colname-list)
colname-list is:
colname [,colname]...

Syntax Description of SELECT

[col-expr]
is an SQL value expression. It can be a column, an arithmetic expression, a function (excluding
aggregate functions), a CASE expression, or a CAST expression.
[ANY N] | [FIRST N]
specifies that N rows are to be returned (assuming the table has at least N rows and that the
qualification criteria specified in the WHERE clause, if any, would select at least N rows) and
you do not care which N rows are chosen (out of the qualified rows) to actually be returned.
You must enclose ANY N or FIRST N in square brackets. [FIRST N] is different from [ANY
N] only if you use ORDER BY on any of the columns in the select list to sort the result table
of the SELECT statement. N is an unsigned numeric literal with no scale. If N is greater than
the number of rows in the table, all rows are returned. [ANY N] and [FIRST N] are
disallowed in nested SELECT statements and on either side of a UNION operation.
ALL | DISTINCT
specifies whether to retrieve all rows whose columns are specified by the select-list
(ALL) or only rows that are not duplicates (DISTINCT). Nulls are considered equal for the
purpose of removing duplicates. The default is ALL.
select-list
specifies the columns or column expressions to select from the table references in the FROM
clause.
*
specifies all columns in a table, view, joined table, or derived table determined by the
evaluation of a query expression, as specified in the FROM clause.
corr.*
specifies all columns of specific table references by using the correlation name corr of
the table references, as specified in the FROM clause. See
corr.single-col [[AS] name]
specifies one column of specific table references by using the correlation name of the table
reference, as specified in the FROM clause.
single-col [[AS] name]
specifies a column.
col-expr [[AS]name]
specifies a derived column determined by the evaluation of an SQL value expression in
the list. By using the AS clause, you can associate a derived column with a name.
See the discussion of limitations in
144
SQL Statements
"Considerations for Select List" (page
"Correlation Names" (page
153).
194).

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Neoview SQL and is the answer not in the manual?

Table of Contents