deallocate cursor

Description

Makes a cursor inaccessible and releases all memory resources committed to that cursor.

Syntax

deallocate [cursor] cursor_name

Parameters

cursor_name

is the name of the cursor to deallocate.

Examples

Example 1

Deallocates the cursor named “authors_crsr”:

deallocate cursor authors_crsr

Example 2

Also deallocates the cursor named “authors_crsr,” but omits cursor from the syntax:

deallocate authors_crsr

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

No permission is required to use deallocate cursor.

See also

Commands close, declare cursor