How do I pass the value of a bind variable to a SQL plus variable? I tried the following way, but it does not work the way I want. I want the value of ENV_VAR=test_value_for_bind_variable.


SQL> var bind_var varchar2(100)
SQL> begin
2 :bind_var :='test_value_for_bind_variable';
3 end;
4 /

PL/SQL procedure successfully completed.

SQL> print :bind_var

test_value_for_bind_variable

SQL> define env_var=:bind_var
SQL> define env_var
DEFINE ENV_VAR = ":bind_var" (CHAR)
--This is not I want!