September 22, 2007 at 1:07 pm
Comments posted to this topic are about the item Get record count for every table in a DB (1 Step)
November 29, 2007 at 8:03 am
cool...
SELECT o.name TableName ,i.rows TblRowCount
FROM sysobjects o
INNER JOIN sysindexes i ON (o.id = i.id)
WHERE o.xtype = 'u'
AND i.indid < 2
order by TblRowCount desc
November 29, 2007 at 9:41 pm
Better think about DBCC UPDATEUSAGE once in a while....
--Jeff Moden
Change is inevitable... Change for the better is not.
January 26, 2009 at 9:57 am
Below is the best in sql2005
SELECT object_name(object_id) 'Table_Name', SUM(row_count) 'Total_Rows'
FROM sys.dm_db_partition_stats where index_id <2 GROUP BY object_name(object_id)
ORDER BY object_name(object_id)
Comments please....
Srihari Nandamuri
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply