In embedded SQL, statements that retrieve data and statements that update data can both involve cursors. Not all backend DBMSs support cursor statements.
Retrieval statements
The retrieval statements that involve cursors are:
-
DECLARE cursor_name CURSOR FOR ...
-
OPEN cursor_name
-
FETCH cursor_name INTO ...
-
CLOSE cursor_name
Update statements
The update statements that involve cursors are:
-
UPDATE ... WHERE CURRENT OF cursor_name
-
DELETE ... WHERE CURRENT OF cursor_name
See also