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="%';