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 OPEN statements, 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 OPEN statement.
If the optional keyword RELEASE is 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 extended cursors.
In a procedural usage context, a cursor cannot be specified by extended-cursor-name.
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 EXTENSION Support for the RELEASE keyword is a Mimer SQL extension.
Upright Database Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40