模糊查询
一、占位符
1。(_:单个任意字符)
2。(%:多个任意字符)
例:查询student表中姓马的人
select * from student where name like ’ 马%';
例:查询姓名中第二个字是华的人
select * from student where name like ’ _华%';
例:查询姓名是三个名字的人
select * from student where name like ’ ___';(引号内是三个下划线)
例:查询姓名中包含马的人
select * from student where name like ’ %马%';
数据库基本操作(5)
最新推荐文章于 2022-05-12 18:47:38 发布