一般用于模糊搜索。%
代表n个字符,_
代表一个字符,%
和 _
可同时使用。
select * from info where name like "%fe%";
select * from info where name like "%ng";
select * from info where email like "%@qq.com";
select * from info where name like "mu%ng";
select * from info where name like "m%g";
select * from info where email like "598779784%";
select * from info where email like "_@qq.com";
select * from info where email like "_98779784@qq.com";
select * from info where email like "__8779784@qq.com";
select * from info where email like "__peiqi_live.co_";
注意:适用于数量少的搜索。