我的mysql
中有100个电子邮件地址表及其外观 <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="09686b6a497170276a6664" rel="noreferrer noopener nofollow">[email protected]</a>, <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f99f9d9e9fb98180d79a9694" rel="noreferrer noopener nofollow">[email protected]</a>, <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d3b4bbb5b693abaafdb0bcbe" rel="noreferrer noopener nofollow">[email protected]</a>, <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="82e7f0e7e9e9e7c2fafbf8ace1edef" rel="noreferrer noopener nofollow">[email protected]</a>,<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2f5b5b566f575655014c4042" rel="noreferrer noopener nofollow">[email protected]</a>, <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7f1a0d1a3f0706511c1012" rel="noreferrer noopener nofollow">[email protected]</a>, ect...
。我需要更改所有@xy.com
至@xyz.com
使用mysql
查询。
请帮我查询
提前致谢!
最佳答案
你可以试试这个:
update myTable
set email = replace(email, '@xy.com', '@xyz.com')
where email like '%@xy.com'
关于mysql - 如何使用mysql替换字符串的一部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33606084/