1.where条件查询
where查询不可以使用别名。
select* from 表名 where 查询条件;
2.null查询
select* from 表名 where 查询条件 is null;
select* from 表名 where 查询条件 <=>null;
3.in 查询
所有满足条件的结果都会被查出来。
select* from 表名 where 查询条件1 in 查询条件2;
4.like查询(模糊查询)
/ :或者
_ :字段中的一部分
select* from 表名 where 查询条件 like ‘%_‘ / ‘_%‘;
5.分页查询
查询某一个页面上的部分信息
n/s :限制查询条件
offset :偏移,跳过
n offset s 查询n条,跳过s条
.select* from 表名 limit n ;
select* from 表名 limit s,n;
select* from 表名 limit n offset s;
select* from 表名 limit s,n;与select* from 表名 limit n offset s;查询结果相同。其中值的位置恰好相反。