update comment set url=IF(url REGEXP 'test.yahoo.com.cn',REPLACE(url,'www1.sohu.com','www.sina.com'),REPLACE(url,'www2.yahoo.com','www.sina.com')) where 1=1;
update comment set author_url=REPLACE(author_url,'sohu','sina') where author_url REGEXP 'www.sohu.com';
MySQL replace函數(shù)替換字符串
MySQL replace函數(shù)我們經(jīng)常用到,下面就為您詳細介紹MySQL replace函數(shù)的用法,希望對您學習MySQL replace函數(shù)方面能有所啟迪。