How to avoid variable substitution in Oracle SQL Developer with #39;trinidad amp; tobago#39;(如何避免在 Oracle SQL Developer 中使用 trinidad amp; 进行变量替换多巴哥)
问题描述
当我尝试在 Oracle SQL Developer 2.1 中执行此语句时,会弹出一个对话框输入替换变量",要求为 TOBAGO 提供替换值,
update t set country = 'Trinidad and Tobago' where country = 'trinidad &多巴哥';如果不求助于 chr(38) 或 u'trinidad 026 tobago' 两者都掩盖了语句的目的,我该如何避免这种情况?
在查询前调用:
set 定义关闭;或者,hacky:
update t set country = 'Trinidad and Tobago' where country = 'trinidad &'||'多巴哥';<小时>
来自调整 SQL*Plus:><块引用>
SET DEFINE OFF 禁用解析命令以替换替换变量及其值.
When I try to execute this statement in Oracle SQL Developer 2.1 a dialog box "Enter Substitution Variable" pops up asking for a replacement value for TOBAGO,
update t set country = 'Trinidad and Tobago' where country = 'trinidad & tobago';
How can I avoid this without resorting to chr(38) or u'trinidad 026 tobago' which both obscure the purpose of the statement?
Call this before the query:
set define off;
Alternatively, hacky:
update t set country = 'Trinidad and Tobago' where country = 'trinidad &' || ' tobago';
From Tuning SQL*Plus:
SET DEFINE OFF disables the parsing of commands to replace substitution variables with their values.
这篇关于如何避免在 Oracle SQL Developer 中使用 'trinidad & 进行变量替换多巴哥'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何避免在 Oracle SQL Developer 中使用 'trinidad & 进行变量替换多巴哥'
基础教程推荐
- 在 SQL 中连接多个表 2021-01-01
- 是否可以执行按位分组功能? 2021-01-01
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- 无法解决整理冲突 2021-01-01
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
