SQLPlus在DML语句执行期间的奇怪反应
今天我在sqlplus、oracle 10.2 中从sql 文件执行DML 语句,我发现了一些奇怪的东西,这实际上是一个问题“Enter value for hamburger:”。请参阅附件
,问题“输入 XXX 的值”的结尾随着时间间隔不断变化。我的意思是几秒钟后我发现语句“输入麦当劳的值”....
我想知道sqlplus 正常吗???
我尝试通过在 sqlplus 中给出 sql 文件的位置来执行 DML 语句。
SQL>@/tmp/myDir/dmls.sql;
sql 文件中的示例语句是
Insert into MYSCHEMA.MYTABLE (ID,DIX_DIR_ID,DIX_AGL,DIX_XML_INLINE) values (23202,1100080319000620471,'directory','<values>
<dir_class_title>Person</dir_class_title>
</values>
');
Today i was executing DML statements from sql file in sqlplus, oracle 10.2, i found something weird which is actually a question "Enter value for hamburger:". See attached
and ending of question "Enter value for XXX" kept change with intervals. i mean after few seconds i found statement "Enter value for mcdonald"....
I want to know is it normal with sqlplus ????
i have tried to execute DML statement by giving location of sql file in sqlplus.
SQL>@/tmp/myDir/dmls.sql;
An Exemplary statement from sql file is
Insert into MYSCHEMA.MYTABLE (ID,DIX_DIR_ID,DIX_AGL,DIX_XML_INLINE) values (23202,1100080319000620471,'directory','<values>
<dir_class_title>Person</dir_class_title>
</values>
');
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的语句中肯定有一个&符号。
当 SQL*Plus 遇到 & 符号时,它会尝试将其替换为其定义的内容。如果未定义,则提示输入一个值:
这是一个不带 & 符号的语句:
现在,另一个带 & 符号的语句。
foo
的值尚未定义,因此它提示输入一个:Now,
foo
is Defined to be bar:select 语句(使用
&foo
)返回 bar:另请参阅 定义 和 定义替换变量
如果您想关闭该行为,请执行
编辑操作:将
set Define=
更改为set Define根据 Adam Musch 的建议关闭
。You most certainly have an ampersand in your statement.
When SQL*Plus encounters an ampersand, it tries to replace it with what it is defined to. If it is undefined, it prompts for a value:
This is a statment without ampersand:
Now, another statement with an ampersand. The value for
foo
is not (yet) defined, so it prompts for one:Now,
foo
is defined to be bar:The select statement (with
&foo
) returns bar:See also DEFINE and Defining Substitution Variables
If you want to turn that behavior off, do as
Edit: changed
set define=
toset define off
as per Adam Musch's suggestion.