SQL/MX 2.x Reference Manual (G06.24+, H06.03+)

SQL/MX Statements
HP NonStop SQL/MX Reference Manual523725-004
2-235
UPDATE Statement
rowset-expression
is an array of SQL value expressions that specifies values for the column.
A rowset-expression can appear in the SET ON ROLLBACK clause
only when a rowset-search-condition is present in the WHERE
clause.
The rows returned by the nth element in the rowset-search-condition are
updated by using the nth element in the rowset-expression. The rules
described above for expression apply to each array element in the rowset-
expression.
For information on using host variables and rowsets, see the SQL/MX
Programming Manual for C and COBOL.
WHERE search-condition
specifies a search-condition that selects rows to update. Within the
search-condition, columns being compared are also being updated in the
table or view. See Search Condition on page 6-105.
If you do not specify a search-condition, all rows in the table or view are
updated.
Do not use an UPDATE statement with a WHERE clause that contains a SELECT
for the same table. Reading from and inserting into, updating in, or deleting from
the same table generates an error. Use a positioned (WHERE CURRENT OF)
UPDATE instead.
WHERE rowset-search-condition
specifies an array of search conditions that selects rows to delete. The search
conditions are applied successively and rows selected by each condition are
updated before the next search condition is applied. Therefore, a single row can be
updated multiple times. You can use a rowset expression in the set clause only if a
rowset search condition is present. See Rowset Search Condition on
page 6-107.
[FOR] access-option ACCESS
specifies the access-option required for data used in the evaluation of a search
condition. See Data Consistency and Access Options on page 1-6.
READ COMMITTED
specifies that any data used in the evaluation of the search condition must be
from committed rows.
Embed