DROP VARIABLE Statement

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

Quick Links:

Go to Parameters

Go to Usage

Go to Standards

Go to Permissions

Syntax

DROP VARIABLE [ IF EXISTS ] identifier

Parameters

(back to top)

Usage

(back to top)

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

(back to top)

  • SQL—Vendor extension to ISO/ANSI SQL grammar.
  • SAP Sybase Database product—Not supported by Adaptive Server.

Permissions

(back to top)

None

Related reference
CREATE VARIABLE Statement
SET Statement [ESQL]