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函數替換字符串
MySQL replace函數我們經常用到,下面就為您詳細介紹MySQL replace函數的用法,希望對您學習MySQL replace函數方面能有所啟迪。