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

SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
2-226
UPDATE Statement
UPDATE Statement
Considerations for UPDATE
MXCI Examples of UPDATE
C Examples of UPDATE
COBOL Examples of UPDATE
Publish/Subscribe Examples of DELETE
The UPDATE statement is a DML statement that updates data in a row or rows in a
table or updatable view. Updating rows in a view updates the rows in the table on
which the view is based.
The two forms of the UPDATE statement are:
Searched UPDATE—Updates rows whose selection depends on a search
condition
Positioned UPDATE—Updates a single row determined by the cursor position.
For the searched UPDATE form, if there is no WHERE clause, all rows are updated in
the table or view.
Use the positioned form of UPDATE only in embedded SQL programs. Use the
searched form in MXCI or embedded SQL programs.
Searched UPDATE is:
[ ROWSET FOR INPUT SIZE rowset-size-in ]
UPDATE table
| STREAM (table) [AFTER LAST ROW]
SET set-clause [,set-clause ]...
[SET ON ROLLBACK set-roll-clause [,set-roll-clause]...]
[WHERE search-condition | rowset-search-condition]
[[FOR] access-option ACCESS]
set-roll-clause is:
column-name = expression | rowset-expression
access-option is:
READ COMMITTED
| SERIALIZABLE
| REPEATABLE READ
| SKIP CONFLICT
Embed
Embed
Pub/Sub
Pub/Sub
Embed
Pub/Sub
Embed