Check pre-defined variables : Variable « SQL PLUS Session Environment « Oracle PL/SQL Tutorial






SQL>
SQL> def x
DEFINE X               = "7500" (CHAR)
SQL> def
DEFINE _DATE           = "" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "XE" (CHAR)
DEFINE _USER           = "JAVA2S" (CHAR)
DEFINE _PRIVILEGE      = "" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1002000100" (CHAR)
DEFINE _EDITOR         = "Notepad" (CHAR)
DEFINE _O_VERSION      = "Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production" (CHAR)
DEFINE _O_RELEASE      = "1002000100" (CHAR)
DEFINE _RC             = "0" (CHAR)
DEFINE X               = "7500" (CHAR)
SQL> undefine x
SQL>








29.61.Variable
29.61.1.Use 'variable command' to define variable to reference cursor
29.61.2.Bind variables can be declared in your SQL*Plus script,Preface a bind variable with a colon to reference it in a PL/SQL block
29.61.3.Bind variables can even be referenced by SQL queries
29.61.4.Define variable and print its value out
29.61.5.Define variable and set value
29.61.6.Define variable and use it in sql statement
29.61.7.Print variable out
29.61.8.Undefine variable
29.61.9.Check pre-defined variables
29.61.10.Use defined-variable in update set statement