Get the row count and size of data table is very important in SQL Server.
These infomation about data table can select by stored procedure “sp_spaceused”.
usage of “sp_spaceused”: http://msdn.microsoft.com/en-us/library/ms188776.aspx
To get all table’s infomation by the following SQL:
CREATE TABLE #t(name varchar(255), rows bigint, reserved varchar(20), data varchar(20), index_size varchar(20), unused varchar(20))
exec sp_MSforeachtable "insert into #t exec sp_spaceused '?'"
SELECT * FROM #t order by name
DROP TABLE #t
based: http://www.cnblogs.com/drc/archive/2007/11/29/977189.html