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

SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
2-148
INSERT Statement
For the description of value expressions, see Expressions on page 6-37. For
the description of query-expr, see SELECT Statement on page 2-174.
rowset-value-const
There must be at least one rowset expression in the rowset value constructor.
See the SQL/MX Programming Manual for C and COBOL for a discussion of
semantics when rowsets of different length or rowsets and scalars are used in
a rowset value constructor.
FROM ROWSET rowset-size
restricts the size of the rowset-derived table to the specified size, which must
be less than or equal to the allocated size for the rowset. The size, if specified,
immediately follows the ROWSET keyword. The size is an unsigned integer or
a host variable whose value is an unsigned integer. If you do not specify the
size, NonStop SQL/MX uses the allocated rowset size specified in the SQL
Declare Section.
:array-name [,:array-name]...
specifies a set of host variable arrays. Each array-name can be used like a
column in the rowset-derived table. Each array-name can be any valid host
language identifier with a data type that corresponds to an SQL data type.
Precede each array-name with a colon (:) within an SQL statement.
For more information on rowsets and host variable arrays, see the SQL/MX
Programming Manual for C and COBOL.
ORDER BY {colname | colnum [ASC[ENDING] | DESC[ENDING]]
[,{colname | colnum} [ASC[ENDING] | DESC[ENDING]]]...
determines the order of the rows in the source table derived from the
evaluation of query-expr and therefore the order of insertion into table.
The query expression is evaluated and the source table ordered before
inserting any rows into the target table. Note that this option has no effect when
inserting into a table with a key-sequenced physical organization.
colname
is the name colname of a column in a table or view that is referenced by
the query expression and optionally qualified by a table, view, or correlation
name; for example, CUSTOMER.CITY. If a column has been aliased to
another name you must use the alias name.
colnum
specifies a column by its position colnum in the select list of the query
expression. Use colnum to refer to unnamed columns, such as columns in
the derived table of a query expression other than a table or view.
Embed
MXCI