如何忽略从 SQL Plus 运行的 SQL 脚本中的&符号?

2021-12-01 00:00:00 sql oracle sqlplus

我有一个 SQL 脚本,该脚本创建了一个包,其中包含一个与符号 (&) 的注释.当我从 SQL Plus 运行脚本时,系统会提示我为以 & 开头的字符串输入替代值.如何禁用此功能以便 SQL Plus 忽略与号?

I have a SQL script that creates a package with a comment containing an ampersand (&). When I run the script from SQL Plus, I am prompted to enter a substitute value for the string starting with &. How do I disable this feature so that SQL Plus ignores the ampersand?

推荐答案

这可能对你有用:

set define off

否则与号需要在字符串的末尾,

Otherwise the ampersand needs to be at the end of a string,

'StackOverflow &' || ' you'

保存时我很高兴...这是从 博客.

I was click-happy when saving... This was referenced from a blog.

相关文章