NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
I-14
INSERT Statement
INSERT Statement
INSERT is a DML statement that inserts a row into a table or protection view.
name
is the name of a table or protection view (or an equivalent DEFINE) in which to
insert rows. name cannot be the name of a catalog table.
[ * [ , syskey ] ]
[ syskey , * ]
[ col [ , col ] ... ]
specifies the columns in the table or view in which to insert values (including null
values) in the same order in which the values appear later in the statement, as
follows:
The default is all columns, except the SYSKEY column, in the order in which
INVOKE would list them.
You can specify a SYSKEY column only for a table with relative file organization
or for a view defined on such a table.
INSERT INTO { name } [ ( column-list ) ]
{ VALUES ( val [, val ] ...) [ insert-opt ] ... }
{ ( select-stmt ) [ insert-opt ] ... }
{ select-stmt }
column-list is: [ * [ , syskey ] ]
[ syskey , * ]
[ col [ , col ] ... ]
insert-opt is: { [ FOR ] { STABLE } ACCESS }
{ { REPEATABLE } }
{ }
{ { :host-var } }
{ RETURNING { LASTSYSKEY} }
{ { ?param } }
{ }
{ { APPEND | ANYWHERE } }
* All columns except the SYSKEY column
syskey
The name of the SYSKEY column (usually SYSKEY)
col
The unqualified name of a column