赞
踩
1.排序 order by
select 字段 from 表名 order by 字段 [asc | desc];
select * from stu order by age; #默认按照升序进行排序
select * from stu order by age asc; # 升序排序
select * from stu order by age desc; # 降序排序
select * from stu order by age desc, score asc; #如果年龄相同, 那么还可以继续按照其它字段来排序
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。