Deletes the row in which the cursor is positioned.
DELETE FROM TableName WHERE CURRENT OF CursorName;
Parameter |
Description |
---|---|
TableName |
The name of the table from which you want to delete a row |
CursorName |
The name of the cursor in which the table was specified |
The USING TransactionObject clause is not allowed with this form of DELETE Where Current of Cursor; the transaction object was specified in the statement that declared the cursor.
Error handling It is good practice to test the success/failure code after executing a DELETE Where Current of Cursor statement.
This statement deletes from the Employee table the row in which the cursor named Emp_cur is positioned:
DELETE FROM Employee WHERE current of Emp_curs ;