How do I ignore ampersands in a SQL script running from SQL Plus?(如何忽略从 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 脚本中的 & 符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何忽略从 SQL Plus 运行的 SQL 脚本中的 & 符号?


基础教程推荐
- 什么是 orradiag_<user>文件夹? 2022-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- 在多列上分布任意行 2021-01-01
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01
- oracle区分大小写的原因? 2021-01-01
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01