Oracle本身默认的是单引号,但是在大家写存储过程或者写SQL语句时,有时候需要拼SQL或者是SQL的值里需要传入含单引号的值,此时就需要使用两个单引号''''来进行转义,其实oracle本身提供了这种转换默认单引号为其他标识的方法那就是——"q"
q [Oracle's quote operator]
q'c text-to-be-quoted c'
c is a single character (called the quote delimiter).
With the «quote operator» apostrophes don't have to be doubled:
SQL> select q'#Oracle's quote operator#' from dual;
Q'#ORACLE'SQUOTEOPERATO
-----------------------
Oracle's quote operator
begin
execute immediate q'#select * from abc#';
end;
相关文章
- Oracle-工具之SQLLDR
- MySQL基础之 LIKE操作符
- ORACLE之ASM概念
- 论文笔记之:Deep Reinforcement Learning with Double Q-learning
- 【转载】 强化学习(九)Deep Q-Learning进阶之Nature DQN
- oracle ora31684,Oracle数据库之oracle中使用impdp数据泵导入数据提示“ORA-31684:对象类型已经存在”错误的解决...
- Qt之Q_PROPERTY(新)
- 初学JavaScript之推測new操作符的原理
- MyBatis在Oracle数据库下用concat函数模糊查询之参数个数无效错误
- Oracle_Q&A_04