我正在努力做到这一点。
这是我的代码
var cvar varchar2(20)
exec :cvar := 'variable value'
print cvar
当前输出
PL/SQL procedure successfully completed.
CVAR
--------------------------------------------------------------------------------
variable value
我只想输出变量值。不是它的名字或任何其他输出
variable value
我尝试了所有这些设置。没有运气
SET DEFINE on
SET HEADING OFF
SET VERIFY OFF
SET FEEDBACK ON
SET ECHO OFF
SET PAGESIZE 0
SET TRIMS ON
SET PAGES 1000
SET APPINFO OFF
SET TIME OFF
SET TIMING OFF
SET TERMOUT ON
SET TRIMS ON
是set heading off
:
SQL> var cvar varchar2(20)
SQL> exec :cvar := 'variable value'
PL/SQL procedure successfully completed.
SQL> print cvar
CVAR
--------------------------------
variable value
SQL> set heading off
SQL> print cvar
--> see? No heading here
variable value
SQL>