ITPub博客

首页 > 应用开发 > IT综合 > set verify and set define

set verify and set define

原创 IT综合 作者:mfm088 时间:2007-01-18 18:02:05 0 删除 编辑

set verify [SQL*PluS]

set verify on
set verify off
If verify is on, SQL*Plus prints two lines for each substituted variable (see set define).

Storing settings across sessions

[@more@]

set verify [SQL*PluS]

set verify on
set verify off
If verify is on, SQL*Plus prints two lines for each substituted variable (see set define).

Storing settings across sessions

Settings (such as verify) can be stored accross sessions with the glogin.sql and/or login.sql file.

set define [SQL*Plus]

set define on
set define off
set define x

set define x

set define x specifies the prefix-character for substitution variables. The default is the ampersand (&).
set define +

select * from dba_objects 
 where object_name like '%+object_name%';

set define on

Turns on substitution variables.
set define on

select '&hello' from dual;
If define is set to on and SQL*Plus finds the current substituion prefix, it asks for a string to be entered. In the following example, I entered: this string was entered
Enter value for hello: this string was entered
old   1: select '&hello' from dual
new   1: select 'this string was entered' from dual

'THISSTRINGWASENTERED'
-----------------------
this string was entered
It might be annoying to see the following lines printed by SQL*Plus:
old   1: select '&hello' from dual
new   1: select 'this string was entered' from dual
This behavior can be turned off by setting verify off.

set define off

Turns off substitution variables.
set define off

select '&hello' from dual;
'&HELL
------
&hello

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/330796/viewspace-891307/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2012-01-14

  • 博文量
    98
  • 访问量
    1040726