Get fast-rowcount  for all tables in a database

,

This little query gives the table name and rowcount for each table in the database that its run.

select A.Name, max(b.Rows) from sysobjects A inner join sysindexes B on a.Id = B.Id
where xtype='u' and OBJECTPROPERTY(a.id, N'IsUserTable') = 1
group by a.name
order by max(b.Rows) DESC

Rate

5 (1)

Share

Share

Rate

5 (1)