Thursday, September 6, 2012

SQL Database Table Rowcounts

How to get the rowcount of all tables in a SQL Server 2000 database:

select distinct convert(varchar(30),object_name(a.id)) [Table Name], a.rows
from sysindexes a inner join sysobjects b on a.id = b.id

Thanks to:
venkattechnicalblog.blogspot.com/2008/09/list-out-all-tables-and-row-count-in.html

No comments:

Post a Comment

Thank you for your time and interest in this post!
Comments to this blog are sometimes moderated to prevent spam. Please don't be alarmed if your comment does not appear immediately.