- mysql 查询
- 基本查询
select * from users;
- 去重
select distinct(name),high from users order by high desc; ## 注意 distinct必须放在第一位,desc降序,distinct不会对结果进行排序
select * from users group by name;
- 过滤
select * from users limit 3 order by desc;
- 聚合函数
标签:查询 name pre ## 必须 常用sql语句 users 常用sql 基本
select * from users;
select distinct(name),high from users order by high desc; ## 注意 distinct必须放在第一位,desc降序,distinct不会对结果进行排序
select * from users group by name;
select * from users limit 3 order by desc;
标签:查询 name pre ## 必须 常用sql语句 users 常用sql 基本
原文地址:http://www.cnblogs.com/hcy-fly/p/8028043.html