最佳答案:SQL 语句中, asc是指定列按升序排列,desc则是指定列按降序排列。排序子句语法:order by 列名 asc/desc例表格:tt1、按列n2的升序排列select * from tt or
SQL 语句中, asc是指定列按升序排列,desc则是指定列按降序排列。
排序子句语法:order by 列名 asc/desc
例表格:tt
1、按列n2的升序排列
select * from tt order by n2 asc;
2、按列n2的降序排列
select * from tt order by n2 desc;
3、复合排序,先按列n1升序排列,再按n2降序排列
select * from tt order by n1 asc,n2 desc;