5. Working with Embedded SQL : Data Manipulation with Cursors : Summary of Cursor Positioning
 
Share this page                  
Summary of Cursor Positioning
The following table summarizes the effects of cursor statements on cursor positioning:
Statement
Effect on Cursor Position
OPEN
Cursor positioned before first row in set.
FETCH
Cursor moves to next row in set. If it is already on the last row, the cursor moves beyond the set and its position becomes undefined.
UPDATE(CURSOR)
Cursor remains on current row.
DELETE(CURSOR)
Cursor moves to a position after the deleted row (but before the following row).
CLOSE
Cursor and set of rows become undefined.
For extended examples of the use of cursors in embedded SQL, see the Embedded SQL Companion Guide.