createtable student(
id char(36)primarykey,
name varchar(8)notnull,
age int(3)default0,
mobile char(11),
address varchar(150))insertinto student
values('9b4435ec-372c-456a-b287-e3c5aa23dff4','张三',24,'12345678901','北京海淀');insertinto student
values('a273ea66-0a42-48d2-a17b-388a2feea244','李%四',10,'98765432130',null);insertinto student
values('eb0a220a-60ae-47b6-9e6d-a901da9fe355','张李三',11,'18338945560','安徽六安');insertinto student
values('6ab71673-9502-44ba-8db0-7f625f17a67d','王_五',28,'98765432130','北京朝阳区');insertinto student
values('0055d61c-eb51-4696-b2da-506e81c3f566','王_五%%',11,'13856901237','吉林省长春市宽平区');select*from student
#模糊查询,# % 匹配0次或多次select*from student where name like'张%'select*from student where name like'张三%'#_只能匹配一次select*from student where name like'张三_'select*from student where name like'张_'#escapeselect*from student where name like'%%%'select*from student where name like'%A%%'escape'A'select*from student where name like'%A_%'escape'A'