select name,email from t where email REGEXP "@163[.,]com$";
==
select name,email from t where email like "@163%.com" or "@163%,com"
本文介绍两种使用SQL从数据库中筛选特定格式电子邮件的方法:一种利用正则表达式进行精确匹配;另一种采用LIKE操作符实现模糊匹配。这两种方法适用于需要快速定位包含特定域名电子邮件的情形。
select name,email from t where email REGEXP "@163[.,]com$";
==
select name,email from t where email like "@163%.com" or "@163%,com"
1624

被折叠的 条评论
为什么被折叠?