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;(不过这是缺省状态)。