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

deallocate cursor permission defaults to all users. No permission is required to use it.

See also

Commands close, declare cursor