猿问

sql server的小题,请解答

请问Compute是什么 后面的by是什么意思,不懂

1. 假设表orderitem有列orderid(int类型)和列thenumber(int类型),则下列语句可以正确执行的是(选一项)

ASelect * from orderitem where orderid<=2 order by orderidCompute sum(thenumber) by orderid

BSelect * from orderitem where orderid<=2Compute sum(thenumber) by orderid

CSelect * from orderitem where orderid<=2 order by thenumberCompute sum(thenumber) by orderid

DSelect * from orderitem where orderid<=2 order by orderidCompute sum(orderid) by thenumber

 


山水郎2015
浏览 1652回答 1
1回答

灬紫羽

这个就是order by;排序的意思,不过是有两个排序条件,例如A选项,先按照orderidCompute sum(thenumber)排序,如果结果中有数据这个值相同,那么就会再次按照  orderid排序;
随时随地看视频慕课网APP

相关分类

SQL Server
我要回答