Approximate total rows in SQL Server database
by Clint
Here is a script that approximates the total rows in your SQL Server 2005+ database. It’s approximate because it comes off sys tables which are not updated constantly.
SELECT [TableName] = so.name, [RowCount] = MAX(si.rows) FROM sysobjects so, sysindexes si WHERE so.xtype = 'U' AND si.id = OBJECT_ID(so.name) GROUP BY so.name ORDER BY 2 DESC |
I found this script at this site so all kudos to them.