5. Embedded OpenSQL : 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 OpenSQL, see the Embedded SQL Companion Guide.