Fork me on GitHub

模糊查询

-1、查询所有王姓同学
select * from xs where 姓名 like '王%'
--2、查询三个字姓王的同学
select * from xs where 姓名 like '王__'
--3、姓王和姓张的同学
select * from xs where 姓名 like '[王,张]%'
--4、查询不是姓王和姓张的同学
select * from xs where 姓名 like '[^王,张]%'

posted @ 2018-10-10 14:52  欢欢11  阅读(155)  评论(0编辑  收藏  举报