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

SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
2-145
INSERT Statement
INSERT Statement
Considerations for INSERT
MXCI Examples of INSERT
C Examples of INSERT
COBOL Examples of INSERT
The INSERT statement is a DML statement that inserts rows in a table or view.
[ ROWSET FOR INPUT SIZE rowset-size-in ]
INSERT INTO table [(target-col-list)] insert-source
target-col-list is:
colname [,colname]...
insert-source is:
query-expr [order-by-clause] | DEFAULT VALUES
query-expr is:
non-join-query-expr | joined-table
non-join-query-expr is:
non-join-query-primary | query-expr UNION [ALL] query-term
query-term is:
non-join-query-primary | joined-table
non-join-query-primary is:
simple-table | (non-join-query-expr)
joined-table is:
table-ref [NATURAL] [join-type] JOIN table-ref [join-spec]
|table-ref CROSS JOIN table-ref
table-ref is:
table [[AS] corr [(col-expr-list)]]
| view [[AS] corr [(col-expr-list)]]
| (query-expr) [AS] corr [(col-expr-list)]
| joined-table
join-type is:
INNER | LEFT [OUTER] | RIGHT [OUTER]
join-spec is:
ON search-condition | rowset-search-condition
Embed
MXCI
Embed