DROP VARIABLE Statement

Eliminates a SQL variable that was created using the CREATE VARIABLE statement.

Syntax

DROP VARIABLE [ IF EXISTS ] identifier

Parameters

Usage

Variables are automatically eliminated when the database connection is released. Variables are often used for large objects, so eliminating them after use or setting them to NULL can free up significant resources (primarily disk space).

Standards

  • SQL—Vendor extension to ISO/ANSI SQL grammar.

  • Sybase—Not supported by Adaptive Server Enterprise.

Permissions

None

Related reference
CREATE VARIABLE Statement
SET Statement [ESQL]