This section describes SQL cursors and explains when and how to use SQL cursors to point to rows in an SQL response set.
A cursor is a data structure that stored procedures and Preprocessor2 use at runtime to point to the result rows in a response set returned by an SQL query.
Stored procedures and embedded SQL also use cursors to manage inserts, updates, execution of multiple-statement requests, and SQL macros.
The syntax of functionally similar cursor control statements depends on whether the cursors are used for stored procedures or embedded SQL. This document presents variant syntax forms with the individual cursor control statements. There are cursor control statements that are valid only with embedded SQL.
Cursors are not valid for sessions you conduct interactively from a terminal using a query manager like BTEQ.