Sql (Return the number of row) | SQL Server Performance Forums

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 A
id 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=’:)‘ />]<br />May be, I’ve over looked the <i>From this example , it should return 3 (because 3 rows)</i><br /><br /><hr noshade size="1"><b>Satya SKJ</b><br />Moderator<br /<a target="_blank" href=http://www.SQL-Server-Performance.Com/forum>http://www.SQL-Server-Performance.Com/forum</a><br /><center><font color="teal"><font size="1">This posting is provided “AS IS” with no rights for the sake of <i>knowledge sharing.</i></font id="size1"></font id="teal"></center>
]]>