Update and Delete Using WHERE CURRENT OF
In a stored procedure, update or delete a row at which the cursor is currently positioned.
DELETE FROM table_name ... WHERE CURRENT OF cursor_name UPDATE table_name SET ... WHERE CURRENT OF cursor_name
This will update or delete the record that was last fetched by a cursor. The cursor must have been defined
FOR UPDATE if this is an
DELETE can be performed on a cursor that was not declared as
FOR UPDATE, assuming that it was declared with an updatable query.
A table or view defined in the
FROMclause of the cursor definition query. If
table_namereferences a view, the view must be updatable (see Using Updatable Views).
The name that was associated with the cursor using