deallocate cursor

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

Syntax

deallocate [cursor] cursor_name

Parameters

Examples

Usage

  • You can use deallocate cursor with an archive database.

  • The SAP ASE server returns an error message if the cursor does not exist.

  • You must deallocate a cursor before you can use its cursor name as part of another declare cursor statement.

  • deallocate cursor has no effect on memory resource usage when specified in a stored procedure or trigger.

  • You can deallocate a cursor whether it is open or closed.

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

No permission is required to use deallocate cursor.

Related reference
close
declare cursor