SQL/MX 3.2 Reference Manual (H06.25+, J06.14+)
SQL/MX Statements
HP NonStop SQL/MX Release 3.2 Reference Manual—691117-001
2-315
Considerations for UPDATE
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-57.
WHERE CURRENT OF {cursor-name | ext-cursor-name}
specifies the name of a cursor (or extended cursor) positioned at the row to
update. If you specify cursor-name for an audited table or view, the UPDATE
must execute within a transaction that also includes the FETCH for the row. Each
column to be updated must appear in the FOR UPDATE clause of the cursor
declaration.
For more information on searched and positioned UPDATE statements in embedded
SQL programs, see the SQL/MX Programming Manual for C and COBOL.
Considerations for UPDATE
In a searched UPDATE, rows are updated in sequence.
Statement atomicity means that a statement will either complete or be rolled back,
without having to rollback a business transaction that contains multiple statements.
SQL/MX will try to undo any changes to the database as a result of an update in case
a row cannot be updated.
There are some conditions where such an undo operation will cause an active
transaction to be rolled back instead of just the statemement. The following are some
examples where the active transaction will be rolled back:
Parallel inserts performed by ESPs
VSBB inserts (either explicitly enforced by the CQD INSERT_VSBB set to ON or
when chosen by the optimizer)
CQD UPD_ABORT_ON_ERROR is set to ON to force transactions to be aborted.
This CQD is supported to preserve the behavior of older releases.
The underlying table has referential integrity constraints or triggers defined
For details, see Transaction Management
on page 1-14.
Use the EXPLAIN statement to check whether transactions will be rolled back or if
statement atomicity will be used. For details, see EXPLAIN Statement on
page 2-183
.
Authorization Requirements
UPDATE requires authority to read and write to the table or view being updated and
authority to read any table or view specified in subqueries used in the search condition.
A column of a view can be updated if its underlying column in the base table can be
updated.
C/COBOL










