Chinaunix首页 | 论坛 | 博客
  • 博客访问: 522255
  • 博文数量: 134
  • 博客积分: 7990
  • 博客等级: 少将
  • 技术积分: 1290
  • 用 户 组: 普通用户
  • 注册时间: 2007-10-29 11:43
文章分类

全部博文(134)

文章存档

2009年(7)

2008年(80)

2007年(47)

我的朋友

分类: Oracle

2008-07-19 10:37:20

  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.  
 
当在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;(不过这是缺省状态)。  
阅读(4529) | 评论(0) | 转发(0) |
0

上一篇:五角星

下一篇:每日一句

给主人留下些什么吧!~~