1

如何获取此查询的计数?

select AccountId, * from Account
4

2 回答 2

4
Select Count(*) as CountRecord from Account
于 2013-09-25T06:44:13.647 回答
1

您在错误的地方放置了别名

SELECT COUNT(*) AS CountRecord FROM (SELECT AccountId, * FROM Account) a
-----------------^^^^^^^^^^^^^^^

但是你应该像这样直接计算记录:

SELECT COUNT(*) AS CountRecord FROM Account
于 2013-09-25T06:43:46.463 回答