模糊查询多个字段匹配的值

1.使用正则表达式:
SELECT id,name from table where name regexp “隆达|徽达”;
2.使用通配符%
SELECT id,name from table where name like ‘%a%’ or name like ‘%b%’;

猜你喜欢

转载自blog.csdn.net/qq_36912167/article/details/104634174