The SET VERIFY command is used to turn on and off the display of command lines that have had substitutions performed.
ON turns the display of the changed lines on. This is the default value.
OFF turns the display of changed lines off.
VER added with version 9i.
当在sqlplus中运行的sql语句中有替代变量(以&或&&打头)的时候,
set verify(或ver) on/off可以设置是否显示替代变量被替代前后的语句。
如:
SQL> set ver on;
SQL> select * from dual where 1=&var;
Enter value for var: 1
old 1: select * from dual where 1=&var
new 1: select * from dual where 1=1
DU
--
X
而如果设为off,则显示如下:
SQL> set ver off;
SQL> select * from dual where 1=&var;
Enter value for var: 1
DU
--
X
使用以&和&&开头的替代变量的前提是set define on;(不过这是缺省状态)。
本文介绍 SQL Plus 中 SET VERIFY 命令的作用及用法。通过此命令可以控制带有替代变量(以 & 或 && 开头)的 SQL 语句在执行前后是否显示其变化。文章还解释了如何启用或禁用此功能。
1568

被折叠的 条评论
为什么被折叠?



