CLOSE

The CLOSE statement in SQL Script is used to close a cursor. See DECLARE CURSOR of Type Variable for details on declaring cursors.

Syntax

CLOSE <cursor>

Errors

The following table describes the errors that can occur while executing a CLOSE statement.

Error Message

Cause

Uninitiallized cursor

A cursor variable is used and is not initialized at the time it is opened.

Cursor is not open

CLOSE was invoked when the cursor was not open.