The query below can be used to get the record count of all the tables in the current database.
T.TABLE_NAME AS [TABLE NAME], MAX(I.ROWS) AS [RECORD COUNT]
FROM SYSINDEXES I, INFORMATION_SCHEMA.TABLES T
WHERE T.TABLE_NAME = OBJECT_NAME(I.ID)
AND T.TABLE_TYPE = 'BASE TABLE'
GROUP BY T.TABLE_SCHEMA, T.TABLE_NAME
Example output against Northwind database:
|TABLE NAME||RECORD COUNT|
Programmer | CodeProject MVP, Mentor | Author | Geek | Blogger | Bachelor | Dude
About him & his blog? check out here
. Currently he's updating the site, he'll return soon there with more things*
In Codeproject, he posted a blogpost
& more than couple of Tip/Tricks
, hope he'll write more soon.
Favorite techs are MVC, WCF, Mobile, HTML5, CSS3, jQuery, etc.,
His hobbies are watching movies, CP, being alone, etc., But now he's working on something*