MySQL 字段 LIKE 多个值

版权声明: https://blog.csdn.net/Dongguabai/article/details/91039840

比如需要这样的效果:

select * from user where name like '%四%' or name like '%五%'

可以使用 REGEXP 写成:

select * from user where name regexp '四|五'

References:

https://www.runoob.com/mysql/mysql-regexp.html

猜你喜欢

转载自blog.csdn.net/Dongguabai/article/details/91039840