Cool
Cool
Published on 2021-05-19 / 15 Visits
0
0

SQL简单的查询语句之模糊查询

--查询名字是s开头的姓名
select * from student where name like "s%";
--查询名字是s结尾的姓名
select * from student where name like "%s";
--要查询中间包含s的
select * from student where name like "%s%";
--查询名字第二个字母是s的
select * from student where name like "_s%";
--同理若查找第三个就在其前面写两个_ ,"__s%"


Comment