Open topic with navigation
In a stored procedure, update or delete a row at which the cursor is currently positioned.
table_name... WHERE CURRENT OF
table_nameSET ... WHERE CURRENT OF
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
FROM clause of the cursor definition query. If
table_name references a view, the view must be updatable (see Using Updatable Views).
The name that was associated with the cursor using
AUTOCOMMIT_SP_MODE should be disabled if using an updatable cursor. A
COMMIT will invalidate the last fetched record causing any subsequent
DELETE/UPDATE...WHERE CURRENT OF to throw an exception.