UPDATE clause
Each update-table is matched to a table in the query for the cursor as follows:

If a correlation name is specified, it is matched to a table in the cursor's query that has the same table-or-view-name and the same correlation-name.

If there is a table in the cursor's query that has the same table-or-view-name that does not have a correlation name or has a correlation name that is the same as the table-or-view-name, then the update table is matched with this table in the cursor's query.

If there is a single table in the cursor's query that has the same table-or-view-name as the update table, then the update table is matched with this table in the cursor's query.

If a column has a default defined, use the SET clause to set a column to its default value. For an example, see the Examples
section of UPDATE statement.

USING DESCRIPTOR clause
When assigning a variable, the variable must already be declared, and its name must begin with the at sign (@). Variable
and column assignments can be mixed together, and any number can be used.

SET clause
The columns in set-item must be in the table or view being updated. If a name on the left side of an assignment in the SET list matches a column
in the updated table and the variable name, the statement updates the column.set-item cannot refer to aliases or columns from other tables or views. If the table or view you are updating is given a correlation
name in the cursor specification, use the correlation name in the SET clause.

Each set-item is associated with a single update-table, and the corresponding column of the matching table in the cursor's query is modified. expression references columns of the tables identified in the UPDATE list and can use constants, host variables, variables, expressions
from the SELECT list of the query, or combinations of the above using operators such as +, -, ..., COALESCE, IF, and so on.
expression cannot reference aliases of expressions from the cursor's query or columns of other tables of the cursor's query that are
not in the UPDATE list. Subselects, subquery predicates, and aggregate functions cannot be used in set-item.

This form of the UPDATE statement updates the current row of the specified cursor. The current row is defined to be the last
row successfully fetched from the cursor, and the last operation on the cursor must not have been a positioned DELETE statement.

For syntax 1, columns from the SQLDA or values from the host variable list correspond one-to-one with the columns returned
from the specified cursor. If the sqldata pointer in the SQLDA is the null pointer, the corresponding SELECT list item is
not updated.

In syntax 2, the requested columns are set to the specified values for the row at the current row of the specified query.
The columns do not need to be in the SELECT list of the specified open cursor. This format can be prepared.

Also, when assigning a variable, the variable must already be declared, and its name must begin with the at sign (@). Variable
and column assignments can be mixed together, and any number can be used. If a name on the left side of an assignment in the
SET list matches a column in the updated table and the variable name, the statement updates the column.

The USING DESCRIPTOR, FROM hostvar-list, and hostvar formats are for embedded SQL only.

SQL/2008
Syntax 1 is a vendor extension. Syntax 2 is a core feature of the SQL/2008 standard. If used within an embedded SQL program,
Syntax 2 comprises part of optional SQL language feature B031, "Basic dynamic SQL". The ability to specify more than one table
to be updated is a vendor extension.

The range of cursors that can be updated is dependent upon the setting of the ansi_update_constraints option. The ability
to perform a positioned update over a cursor that is ordered—that is the SQL query has an ORDER BY clause—comprises optional
SQL/2008 language feature F831, "Full cursor update". Performing a positioned update over more complex SQL constructions may
involve additional vendor extensions.