The UPDATE clause specifies that a result table (see
result table name) is to be updateable.Syntax
<update_clause> ::= FOR UPDATE [OF <column_name>,...]
column_nameExplanation
The specified column names must identify columns in the tables underlying the
QUERY specification. They do not have to occur in a selected column.The QUERY statement that contains the UPDATE clause must generate an updateable result table.
The UPDATE clause is a prerequisite for using the result table with
CURRENT OF <result_table_name> in the UPDATE statement, DELETE statement, LOCK statement, SELECT DIRECT statement, and SELECT ORDERED statement. The update clause is meaningless for other forms of the above mentioned SQL statements, as well as in interactive mode.All columns of the underlying base tables are updateable if the user has the corresponding privileges, irrespective of whether they were specified as a
column name.For performance reasons, it is recommended to specify column names only if the cursor is to be used in an update statement.
Assume that the a column x fulfills the following conditions:
If all of the conditions are fulfilled, it is essential that you specify the column x as a column name in the UPDATE clause.
If at least one of these conditions is not satisfied, the column should not be specified.