SQL Plus - Variable

> Procedural Languages > (SQL Plus|SqlCl) (Oracle Database Console)

1 - 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

Advertising

3 - 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
Advertising

4 - Management

For management of bind variables, see the bind variable page

lang/sqlplus/variable.txt · Last modified: 2017/05/09 16:51 by gerardnico