语法:update table_name t set t.row_name=replace(t.row_name,'old_value','new_value')
注:table_name 表名; row_name 被更新的列名; old_value 要被更新的值; new_value 更新的新值
例如:将content里的www,替换为'http://file.resources.tt.515best.com的语句如下:
update tl_lanb11_content t set t.content=replace(t.content,'www','http://file.resources.tt.515best.com') where t.nb_content_id=49976
注:table_name 表名; row_name 被更新的列名; old_value 要被更新的值; new_value 更新的新值
例如:将content里的www,替换为'http://file.resources.tt.515best.com的语句如下:
update tl_lanb11_content t set t.content=replace(t.content,'www','http://file.resources.tt.515best.com') where t.nb_content_id=49976