ODBC Server Reference Manual

CORE SQL Language
HP NonStop ODBC Server Reference Manual429151-002
3-61
UPDATE
UPDATE
Use UPDATE to change data in existing rows, either by adding new data or by
modifying existing data. UPDATE has two forms: the positioned UPDATE and the
searched UPDATE.
The positioned UPDATE changes data in the row from which the current row of the
active set of a cursor is derived.
The searched UPDATE changes data in any rows that satisfy a search condition.
Positioned UPDATE
The positioned UPDATE statement has the following syntax:
table-name
is the table in which rows are to be changed. The table-name can be qualified
with the database name and owner name. If table-name is a viewed table,
UPDATE changes the corresponding row of the base table from which the viewed
table is derived.
The table-name must be the (single) table referenced by the FROM clause of the
query-specification that defines the result table of the cursor.
column-identifier
specifies a column in which the row is to be changed.
expression
is a valid expression to be assigned. Expressions are described under Language
Elements on page 3-2.
NULL
sets the value to NULL.
UPDATE table-name
SET column-identifier = { expression }
{ NULL }
[, column-identifier = { expression } ] ...
{ NULL }
WHERE CURRENT OF cursor-name