开发者

SELECT COUNT(*) SQL SERVER

I have this:

SELECT AssignmentID
FROM ProblemView
GROUP BY AssignmentID

which returns 32 rows. But really what I want is the number 32. If I do this:

SELECT COUNT(*)开发者_运维问答
FROM lru.ProblemView
GROUP BY AssignmentID

I still get 32 rows, and the column is merely the count of the number of Assignments per problem.

I just need the number 32.


SELECT count(distinct AssignmentID) 
FROM ProblemView 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜