SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
2-248
VALUES Statement
VALUES Statement
Considerations for VALUES
Examples of VALUES
The VALUES statement starts with the VALUES keyword followed by a sequence of
row value constructors, each of which is enclosed in parentheses. It displays the
results of the evaluation of the expressions and the results of row subqueries within the
row value constructors.
row-value-constructor
specifies 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 an element of a row-value-constructor is an SQL/MX
extension.
The results of the evaluation of the expressions and the results of the row
subqueries in the row value constructors must have compatible data types.
Considerations for VALUES
Relationship to SELECT Statement
The result of the VALUES statement is one form of a simple-table, which is part of
the definition of a table reference within a SELECT statement. See SELECT Statement
on page 2-174.
Examples of VALUES
This VALUES statement displays the results of the expressions in the list:
VALUES (1,2,3);
(EXPR) (EXPR) (EXPR)
------ ------ ------
1 2 3
--- 1 row(s) selected.
VALUES (row-value-constructor) [,(row-value-constructor)]...
row-value-constructor is:
row-subquery
| {expression | NULL} [,{expression | NULL}]...