为了账号安全,请及时绑定邮箱和手机立即绑定

请问一个字段按倒序排列另外一个按照正序排列一个语句怎么写?

这样好像不行(select ProductID, Name, ProductNumber, Color, Size, ListPrice from Production.Product

order by 2 desc,3 asc)

这样的话是分开的(select ProductID, Name, ProductNumber, Color, Size, ListPrice from Production.Product

order by 2 desc

select ProductID, Name, ProductNumber, Color, Size, ListPrice from Production.Product

order by 3 asc



正在回答

代码语言

1 回答

select ProductID, Name, ProductNumber, Color, Size, ListPrice from Production.Productorder by 2 desc,3 desc这样测试第二列就是倒序,第三列就是正序,不知道为什么。这是我代码测试的结果。

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

请问一个字段按倒序排列另外一个按照正序排列一个语句怎么写?

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号