时间:2021-07-01 10:21:17 帮助过:22人阅读
order by 排序()
SELECT username FROM userinfo ORDER BY userid
order by 按多个列排序(weight从小到大,相同的按age从小到大)
SELECT username,weight,age FROM userinfo ORDER BY weight,age
SELECT username,weight,age FROM userinfo ORDER BY 2,3
以上两个语句效果一样
order by 降序排序(weight降序,age升序)
SELECT username,weight,age FROM userinfo ORDER BY weight DESC,age;
sql的一些知识_order by
标签:order style font color 排序 nbsp 知识 列排序 esc