Oracle7 Server SQL Reference

Contents Index Home Previous Next

CLOSE (Embedded SQL)

Purpose

To disable a cursor, freeing the resources acquired by opening the cursor, and releasing parse locks.

Prerequisites

The cursor must be already open.

Syntax

Keywords and Parameters

cursor

is the cursor to be closed. The cursor must currently be open.

Usage Notes

Rows cannot be fetched from a closed cursor. A cursor need not be closed to be reopened. The HOLD_CURSOR and RELEASE_CURSOR precompiler options alter the effect of the CLOSE command. For information on these options, see Programmer's Guide to the Oracle Precompilers.

Example

This example illustrates the use of the CLOSE command:

EXEC SQL CLOSE emp_cursor 

Related Topics

PREPARE command [*] DECLARE CURSOR command [*] OPEN command [*]


Contents Index Home Previous Next