楼主也不说把答案贴一下。我给出一下吧。UPDATE tablename t SET t.col=REPLACE(col,dfg); commit;结果: asdfghh--->ashh如果有其他条件可以加个whereeg:UPDATE tablename t SET t.col=REPLACE(col,dfg) where t.col like '%dfg%'; commit;
UPDATE tablename SET col=REPLACE(col,'dfg','ashh') where col like '%dfg%'; commit;
这样应该不符合LZ的要求吧,应该是REPLACE(col,'dfg','');
哦,没注意,应该这样: UPDATE tablename SET col=REPLACE(col,'dfg','') where col like '%dfg%'; commit;
UPDATE tablename SET col='ashh' where col like '%dfg%'; 这样是不是更直接
commit;结果:
asdfghh--->ashh如果有其他条件可以加个whereeg:UPDATE tablename t SET t.col=REPLACE(col,dfg) where t.col like '%dfg%';
commit;
commit;
UPDATE tablename SET col=REPLACE(col,'dfg','') where col like '%dfg%';
commit;
这样是不是更直接