关键字
排序:order by
升序: asc(默认是asc)
降序: desc
1.按照年龄降序排列
select *from students order by age desc;
2.先按年龄降序排列,如果年龄相同时,按照身高降序排列
select *from students order by age desc,height desc;
关键字
排序:order by
升序: asc(默认是asc)
降序: desc
1.按照年龄降序排列
select *from students order by age desc;
2.先按年龄降序排列,如果年龄相同时,按照身高降序排列
select *from students order by age desc,height desc;