A searched update statement depends on the table being updated, all of its conglomerates (units of storage such as heaps or indexes), all of its constraints, and any other table named in the WHERE clause or SET expressions.A CREATE or DROP INDEX statement or an ALTER TABLE statement for the target table of a prepared searched update statement invalidates the prepared searched update statement.The positioned update statement depends on the cursor and any tables the cursor references.
However, removing the open cursor with the JDBC method invalidates the positioned update.
A CREATE or DROP INDEX statement or an ALTER TABLE statement for the target table of a prepared positioned update invalidates the prepared positioned update statement.
Dropping an alias invalidates a prepared update statement if the latter statement uses the alias.
The first syntactical form, called a searched update, updates the value of one or more columns for all rows of the table for which the WHERE clause evaluates to TRUE.
The second syntactical form, called a positioned update, updates one or more columns on the current row of an open, updatable cursor.
If columns were specified in the FOR UPDATE clause of the SELECT statement used to generate the cursor, only those columns can be updated.If no columns were specified or the select statement did not include a FOR UPDATE clause, all columns may be updated.Specifying DEFAULT for the update value sets the value of the column to the default defined for that table.The DEFAULT literal is the only value which you can directly assign to a generated column.Whenever you alter the value of a column referenced by the -- All the employees except the manager of -- department (WORKDEPT) 'E21' have been temporarily reassigned.-- Indicate this by changing their job (JOB) to NULL and their pay -- (SALARY, BONUS, COMM) values to zero in the EMPLOYEE table.