1.模糊查询
格式:
select 字段 from 表名 where 字段 like '条件';
_通配符: 表示任意一个字符
%通配符: 表示任意0~n个字符
a_c: abc / adc
abc,adc,abbc,ac
_a_c: 1abc / 3adc
1abc,abc1,2abbc,3adc
a%c:abc / adc / abbc / ac
abc,adc,abbc,ac
%a%c: 1abc / 2abbc / 3adc
1abc,abc1,2abbc,3adc
select * from stu where name like 'z_';
select * from stu where name like 'z__';
select * from stu where name like 'z_%';