SQL/MX 3.2.1 Reference Manual (H06.26+, J06.15+)
SQL/MX Statements
HP NonStop SQL/MX Release 3.2.1 Reference Manual—691117-005
2-257
Considerations for INSERT
Isolation Levels of Transactions and Access Options of
Statements
The isolation level of an SQL/MX transaction defines the degree to which the
operations on data within that transaction are affected by operations of concurrent
transactions. When you specify access options for the DML statements within a
transaction, you override the isolation level of the containing transaction. Each
statement then executes with its individual access option.
You can explicitly set the isolation level of a transaction with the SET TRANSACTION
statement. See SET TRANSACTION Statement on page 2-375. The default isolation
level of a transaction is determined according to the rules specified in Isolation Level
on page 10-56.
It is important to note that the SET TRANSACTION statement might cause a dynamic
recompilation of the DML statements within the next transaction. Dynamic
recompilation occurs if NonStop SQL/MX detects a change in the transaction mode at
run time compared with the transaction mode at the time of static SQL compilation. To
avoid dynamic recompilation because of a change in the transaction mode, consider
specifying access options for individual DML statements instead of using SET
TRANSACTION.
Use of a VALUES Clause for the Source Query Expression
If the query expression consists of the VALUES keyword followed by rows of values,
each row consists of a list of value expressions or a row subquery (a subquery that
returns a single row of column values). A value in a row can also be a scalar subquery
(a subquery that returns a single row consisting of a single column value).
Within a VALUES clause, the operands of a value expression can be numeric, string,
datetime, or interval values; however, an operand cannot reference a column (except
in the case of a scalar or row subquery returning a value or values in its result table).
Inserting From Host Variables
To insert a row from host variables, an application program moves the new values to a
sequence of host variables, and then executes an INSERT statement to transfer the
row of values from the host variables to the table or view.
In this situation, the query expression that defines the insert source is specified as:
VALUES (variable-spec [,variable-spec]...)
Each variable specification has the form:
:variable-name [[INDICATOR] :indicator-name]
Note. NonStop SQL/MX accepts SQL/MP keywords as synonyms for READ UNCOMMITTED,
STABLE, and SERIALIZABLE.
Embed
Embed
C/COBOL










