order by 是用在where条件之后,用来对查询结果进行排序
order by 字段名 asc/desc
asc 表示升序(默认为asc,可以省略)
desc表示降序
order by 无法用于子查询,否则会报错:除非另外还指定了 TOP 或 FOR XML,否则,ORDER BY 子句在视图、内联函数、派生表、子查询和公用表表达式中无效。
原文链接:https://blog.csdn.net/m0_37894254/article/details/80675980
sql 语句中 order by 的用法
猜你喜欢
转载自www.cnblogs.com/liang715200/p/12034981.html
今日推荐
周排行