Closes a cursor.
The current state of the named cursor is closed.
If any states of the cursor have been saved on a stack by successive
OPENstatements, see OPEN, the most recently saved cursor state is restored. Information about whether there are cursor states remaining on the stack is returned as diagnostic information. Otherwise the cursor is closed (deactivated), and may not be used until it has been re-opened with a new
If the optional keyword
RELEASEis used, all resources allocated to the cursor including any stacked references are destroyed. The cursor must be re-prepared (in dynamic SQL) and reopened before it can be used again.
See ALLOCATE CURSOR for a description of
In a procedural usage context, a cursor cannot be specified by
For the statement to be valid, the cursor in question must be open.
ExampleDECLARE c_1 CURSOR FOR SELECT product, producer, format, ... ... ... OPEN c_1; ... ... CLOSE c_1;
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40