SQL support / Positioned updates/deletes |
Deletes the current row in a result set of a database cursor declared for update.
DELETE FROM table-specification WHERE CURRENT OF cid
Use DELETE ... WHERE CURRENT OF to remove the row currently pointed by the associated FOR UPDATE cursor.
After the deletion, no current row exists; you cannot use the cursor to delete or update a row until you reposition the cursor with a FETCH statement.
The scope of reference of the cid cursor identifier is local to the module where it is declared. Therefore, you must execute the DECLARE, UPDATE or DELETE instructions in the same module.
There must be a current row in the result set. Make sure that the SQL status returned by the last FETCH is equal to zero.