天天看点

sql分组分页查询

1.select * from table group by condition;根据group by后的条件去对查询出来的数据进行分组。

2.select * from table group by condition having condition;从分组出来的数据中再去筛选展示。

3.select * from table limit start,length;从第start项开始查询length个长度的数据。

sql