如何获取此查询的计数?
select AccountId, * from Account
答案 0 :(得分:4)
Select Count(*) as CountRecord from Account
答案 1 :(得分:1)
您已将别名放在错误的地方
SELECT COUNT(*) AS CountRecord FROM (SELECT AccountId, * FROM Account) a
-----------------^^^^^^^^^^^^^^^
但你应该直接计算这样的记录:
SELECT COUNT(*) AS CountRecord FROM Account