Opening a Cursor
From InterBase
Go Up to Selecting Multiple Rows
Before data selected by a cursor can be accessed, the cursor must be opened with the OPEN
statement. OPEN
activates the cursor and builds a results table. It builds the results table based on the selection criteria specified in the DECLARE CURSOR
statement. The rows in the results table comprise the active set of the cursor.
For example, the following statement opens a previously declared cursor called DEPT_EMP
:
EXEC SQL OPEN DEPT_EMP;
When InterBase executes the OPEN
statement, the cursor is positioned at the start of the first row in the results table.