SQL 升序、降序排列

/*查询学生表中姓名、学号,并以学号降序排序*/
select name,StuID from Students_information order by StuID desc   /**order by 以什么排序,默认为升序,desc是降序*/

/*查询学生表中前5名学生的姓名,学号,并以学号升序排列*/
select top 5 name,StuID from Students_information order by StuID        /*order by 默认为升序*/

    原文作者:z120270662
    原文地址: https://blog.csdn.net/z120270662/article/details/79446204
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞