Comments posted to this topic are about the item Get record count for every table in a DB (1 Step)
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
Better think about DBCC UPDATEUSAGE once in a while....
Change is inevitable... Change for the better is not.
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)
Viewing 4 posts - 1 through 3 (of 3 total)