如何忽略从 SQL Plus 运行的 SQL 脚本中的 & 符号? [英] How do I ignore ampersands in a SQL script running from SQL Plus?

查看:60
本文介绍了如何忽略从 SQL Plus 运行的 SQL 脚本中的 & 符号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 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.

这篇关于如何忽略从 SQL Plus 运行的 SQL 脚本中的 & 符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆