How to Unbind undef a variable [message #45754] |
Mon, 12 April 2004 00:16  |
sax
Messages: 1 Registered: April 2004
|
Junior Member |
|
|
First i declare a variable in sql*plus...that is abind variable..now i want to unbind/undefine the variable. is there any command like "undef <var_name>"
|
|
|
|
Re: How to Unbind undef a variable [message #45757 is a reply to message #45754] |
Mon, 12 April 2004 05:18  |
William Robertson
Messages: 1643 Registered: August 2003 Location: London, UK
|
Senior Member |
|
|
You can use UNDEFINE on DEFINE variables, but there is no way to remove bind variables. However, you can erase the value by redeclaring the variable.
SQL*Plus: Release 9.2.0.1.0 - Developer's Release
SQL> def somevar = "Some value"
SQL> def somevar
DEFINE SOMEVAR = "Some value" (CHAR)
SQL> undef somevar
SQL> def somevar
SP2-0135: symbol somevar is UNDEFINED
SQL> var somevar varchar2(20)
SQL> exec :somevar := 'Some value'
PL/SQL procedure successfully completed.
SQL> print somevar
SOMEVAR
--------------------------------
Some value
SQL> var somevar varchar2(20)
SQL> print somevar
SOMEVAR
--------------------------------
|
|
|