Table of Contents

About

VARIABLE is a function that:

  • declares a bind variable that can be referenced in SQL and PL/SQL
  • lists the current display characteristics for a single variable or all variables.

SQLPLUS can manage two types of variable:

See also the reserved variable name

Syntax

VAR[IABLE] [variable [type]]

where type represents one of the following:

  • NUMBER
  • CHAR
  • CHAR (n [CHAR|BYTE])
  • NCHAR
  • NCHAR (n)
  • VARCHAR2 (n [CHAR|BYTE])
  • NVARCHAR2 (n)
  • CLOB
  • NCLOB
  • REFCURSOR
  • BINARY_FLOAT
  • BINARY_DOUBLE

Management

For management of bind variables, see the bind variable page