任何人都可以解释一下SET SCAN OFF和SET SCAN On的目的是什么?我知道它的目的是禁用替换变量和参数.但我想要一个明确的解释
解决方法
SET SCAN已过时,但它用于控制是否应扫描替换参数/变量. OFF会阻止扫描参数/变量.
SET DEFINE替换/扩展了功能,这里有一个很好的写法:http://shaharear.blogspot.com/2009/01/set-define.html
来自网站
set define on;
select ‘&hello’ from dual;
If define is set to on and sql*Plus finds the current substitution
prefix,it asks for a string to be entered. In the following example,
I entered: hasanEnter value for hello: this string was entered
old 1: select '&hello' from dual new 1: select 'this string was entered' from dual
这相当于旧的SET SCAN的工作方式.基本上你控制是否提示替换