加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

oracle 替换clob里面的某个特定的字符串

发布时间:2020-12-12 15:51:28 所属栏目:百科 来源:网络整理
导读:第一步:判断clob里面是有包含某个特定的字符串:假如是说“/admin/ewebeditor/uploadfile/“ 关键字:dbms_lob.instr Code: [sql] view plain copy print ? select st.id,st.content from t_d_strategyst where dbms_lob.instr(st.content, '/admin/ewebed

第一步:判断clob里面是有包含某个特定的字符串:假如是说“/admin/ewebeditor/uploadfile/“

关键字:dbms_lob.instr

Code:

[sql] view plain copy print ?
  1. selectst.id,st.content
  2. fromt_d_strategystwheredbms_lob.instr(st.content,'/admin/ewebeditor/uploadfile/')>0;



第二步:用replace先替换下看是否是自己想要的结果

关键字:replace

Code:

copy replace(st.content,'/admin/ewebeditor/uploadfile/','E:/resource/images/uploadfile/')
  • fromt_d_strategystwherest.id=553anddbms_lob.instr(st.content,'/admin/ewebeditor/uploadfile/')>0;



  • 第三步:替换,前面的两步ok,肯定错不了的

    关键字:update set

    Code:

    copy updatet_d_strategystsetst.content= wherest.id=553'/admin/ewebeditor/uploadfile/')>0; From:http://blog.csdn.net/xb12369/article/details/11518883

    (编辑:李大同)

    【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

      推荐文章
        热点阅读