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

SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
2-149
Considerations for INSERT
ASC | DESC
specifies the sort order. The default is ASC. For ordering the source table
on a column that can contain null, nulls are considered equal to one
another but greater than nonnulls.
DEFAULT VALUES
specifies a query expression of the form VALUES (DEFAULT, ... ). The value of
each DEFAULT is the default value defined in the column descriptor of
colname, which is contained in the table descriptor of table. Each default
value is inserted into its column to form a new row.
If you specify DEFAULT VALUES, you cannot specify a column list. You can
use DEFAULT VALUES only when all columns in table have default values.
[FOR] access-option ACCESS
specifies the access option required for data accessed and returned in the source
table derived from the evaluation of a query expression that is a SELECT
statement. See Data Consistency and Access Options on page 1-7.
READ COMMITTED
specifies that any data accessed and returned in the source table derived from
the evaluation of the query expression must be from committed rows.
SERIALIZABLE | REPEATABLE READ
specifies that the INSERT statement and any concurrent process (accessing
the same data) execute as if the statement and the other process had run
serially rather than concurrently.
The default access option is the isolation level of the containing transaction, which
is determined according to the rules specified in Isolation Level on page 10-45.
IN {SHARE | EXCLUSIVE} MODE
specifies that either SHARE or EXCLUSIVE locks be used when accessing data
specified by a SELECT statement or by a table reference in the FROM clause
derived from the evaluation of a query expression that is a SELECT statement; and
when accessing the index, if any, through which the table accesses occur.
Considerations for INSERT
The number of records that you can insert without causing a compiler error is 250
records for SQL/MP tables and 150 records for SQL/MX tables.
If a row does not qualify for insertion for any reason and you are not using DP2’s
Savepoint feature, NonStop SQL/MX returns an error message and stops inserting
rows. NonStop SQL/MX automatically rolls back the transaction to undo the inserts
already made into the audited table.