当前位置: 代码迷 >> Oracle管理 >> 字符串中有单引号时,怎么使用replace函数
  详细解决方案

字符串中有单引号时,怎么使用replace函数

热度:18   发布时间:2016-04-24 04:30:53.0
字符串中有单引号时,如何使用replace函数
如一个clob型字段det,内容为a'b'c,我希望将a替换为d,可是replace(det,'a','d')会出错。
求解决。
字符串有单引号 replace

------解决方案--------------------
create table t_clob (id clob)
insert into t_clob(id) values('a''b''c')
select to_char(id),to_char(replace(id,'a','d')) from t_clob;
  相关解决方案