使用mysql中的replace函數
update `table` set content=replace(content,'要替換的字符','替換后的字符');
如果要替換符合條件的數據后面加where條件
update `附表` set content=replace(content,'要替換的字符','替換后的字符') where id in(select id from `主表` where 條件) 替換附表的內容
使用mysql中的replace函數
update `table` set content=replace(content,'要替換的字符','替換后的字符');
如果要替換符合條件的數據后面加where條件
update `附表` set content=replace(content,'要替換的字符','替換后的字符') where id in(select id from `主表` where 條件) 替換附表的內容
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。