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

前端之家收集整理的这篇文章主要介绍了oracle 替换clob里面的某个特定的字符串前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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

关键字:dbms_lob.instr

Code:

  1. select@H_403_38@st.id,st.content
  2. from@H_403_38@t_d_strategystwhere@H_403_38@dbms_lob.instr(st.content,'/admin/ewebeditor/uploadfile/'@H_403_38@)>0;



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

关键字:replace

Code:




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

关键字:update set

Code:

copy
update@H_403_38@t_d_strategystset@H_403_38@st.content= where@H_403_38@st.id=553'/admin/ewebeditor/uploadfile/'@H_403_38@)>0;
From:http://blog.csdn.net/xb12369/article/details/11518883

猜你在找的Oracle相关文章