Oracle replace 的函数用法

来源:互联网 发布:apache 伪静态 编辑:程序博客网 时间:2024/05/21 15:43

replace 函数用法如下:

replace('将要更改的字符串','被替换掉的字符串','替换字符串')

例:select  replace ('111222333444','222','888') from dual;

输出为 '111888333444'


sql:例子

update t_gov_news_detail t   set t.content = replace(replace(t.content,                                   'src="',                                   'src="http://www.ddk.gov.cn/'),                           'href="',                           'href="http://www.ddk.gov.cn/') where t.content like '%src="%'    or t.content like '%href="%';


0 0