SQLPlus在DML语句执行期间的奇怪反应

发布于 2024-12-27 20:02:26 字数 625 浏览 0 评论 0原文

今天我在sqlplus、oracle 10.2 中从sql 文件执行DML 语句,我发现了一些奇怪的东西,这实际上是一个问题“Enter value for hamburger:”。请参阅附件 image

,问题“输入 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 image

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦里人 2025-01-03 20:02:26

您的语句中肯定有一个&符号。

当 SQL*Plus 遇到 & 符号时,它会尝试将其替换为其定义的内容。如果未定义,则提示输入一个值:

这是一个不带 & 符号的语句:

SQL> select 'foo' from dual;
'FO
---
foo

现在,另一个带 & 符号的语句。 foo 的值尚未定义,因此它提示输入一个:

SQL> select '&foo' from dual;
Enter value for foo: bla
old   1: select '&foo' from dual
new   1: select 'bla' from dual

'BL
---
bla

Now, foo is Defined to be bar

SQL> define foo=bar

select 语句(使用 &foo)返回 bar

SQL> select '&foo' from dual;
old   1: select '&foo' from dual
new   1: select 'bar' from dual

'BA
---
bar

另请参阅 定义定义替换变量

如果您想关闭该行为,请执行

SQL> set define off

编辑操作:将 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:

SQL> select 'foo' from dual;
'FO
---
foo

Now, another statement with an ampersand. The value for foo is not (yet) defined, so it prompts for one:

SQL> select '&foo' from dual;
Enter value for foo: bla
old   1: select '&foo' from dual
new   1: select 'bla' from dual

'BL
---
bla

Now, foo is defined to be bar:

SQL> define foo=bar

The select statement (with &foo) returns bar:

SQL> select '&foo' from dual;
old   1: select '&foo' from dual
new   1: select 'bar' from dual

'BA
---
bar

See also DEFINE and Defining Substitution Variables

If you want to turn that behavior off, do as

SQL> set define off

Edit: changed set define= to set define off as per Adam Musch's suggestion.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文