The AskTOM team is taking a break over the holiday season, so we're not taking questions or responding to comments. Please have a happy and safe festive season and as always, thanks for being a member of the AskTOM community.
Thanks for the question, Anna.
Asked: March 18, 2021 - 7:21 am UTC
Last updated: March 22, 2021 - 7:30 am UTC
Version: 11.1.0.6.0
Viewed 1000+ times
VARIABLE tmp_var VARCHAR2(10)=Smith
VARIABLE tmp_var VARCHAR2(10) VARIABLE tmp_var=Smith EXECUTE DBMS_OUTPUT.PUT_LINE(:tmp_var)
SQL> VARIABLE tmp_var VARCHAR2(10)=Smith SQL> EXECUTE DBMS_OUTPUT.PUT_LINE(:tmp_var) Smith PL/SQL procedure successfully completed. SQL> SQL> VARIABLE tmp_var VARCHAR2(10) SQL> VARIABLE tmp_var=Smith SQL> EXECUTE DBMS_OUTPUT.PUT_LINE(:tmp_var) Smith PL/SQL procedure successfully completed.
A reader, March 18, 2021 - 8:51 pm UTC
A reader, March 18, 2021 - 8:53 pm UTC
Rajeshwaran Jeyabal, March 20, 2021 - 3:32 pm UTC
demo@XEPDB1> variable x number = 55 demo@XEPDB1> exec dbms_output.put_line('x = '||:x); x = 55 PL/SQL procedure successfully completed. demo@XEPDB1> print x X ---------- 55 demo@XEPDB1> $ sqlplus -version SQL*Plus: Release 18.0.0.0.0 - Production Version 18.4.0.0.0
Check out more PL/SQL tutorials on our LiveSQL tool.
PL/SQL reference manual from the Oracle documentation library