SQL Server Performance Forum – Threads Archive
Sql (Return the number of row)
Is it possible to write sql to return the number of row in the table ? If so how ? For example , table Aid name
21 AA
33 BB
11 CC From this example , it should return 3 (because 3 rows)
Take a look at the COUNT() aggregate function in BOL. It will give you what you need. ———————–
–Frank
http://www.insidesql.de
———————–
Not an easy way:
http://www.sqlteam.com/item.asp?ItemID=1491 for reference. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS†with no rights for the sake of knowledge sharing.
As far as I understand the question it’s a simple
SELECT COUNT(*) FROM tableA
———————–
–Frank
http://www.insidesql.de
———————–
[<img src=’/community/emoticons/emotion-1.gif’ alt=’
![Smile :) :)](styles/default/xenforo/smilies/smile.png)
]]>