简体   繁体   English

如何在sqlplus中打印变量名时禁止打印变量名?

[英]How to suppress printing variable name while printing its value in sqlplus?

I am trying to achieve this.我正在努力实现这一目标。

This is my code这是我的代码

var cvar varchar2(20) exec:cvar:= 'variable value' print cvar

This is the current output这是当前的 output

 PL/SQL procedure successfully completed. CVAR -------------------------------------------------------------------------------- variable value

I want to output only the variable value.我只想 output 变量值。 Not its name or any other output不是它的名字或任何其他 output

 variable value

I tried all these settings.我尝试了所有这些设置。 no luck没运气

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

It is set heading off :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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM