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 脚本中的&符号?


基础教程推荐
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- SQL Server 2016更改对象所有者 2022-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01