Mimer SQL Documentation TOC PREV NEXT INDEX

Mimer SQL Developer Site


CLOSE


Closes a cursor.



Usage

Embedded/Procedural.

Description

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-cursor-name.

Restrictions

In a procedural usage context, a cursor cannot be specified by extended-cursor-name.

Notes

For the statement to be valid, the cursor in question must be open.

Example

 DECLARE c_1 CURSOR FOR SELECT product, producer, format,
                               ...
 ...
 ...
 OPEN c_1;
 ...
 ...
 CLOSE c_1;

Standard Compliance

Standard
Compliance
Comments
SQL-2011
Core
Fully compliant.

Mimer SQL extension
The keyword RELEASE is a Mimer SQL extension.


Mimer
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
info@mimer.se
Mimer SQL Documentation TOC PREV NEXT INDEX