Pages

Thursday 10 January 2013

Display total number of rows for each table in database

select o.name 'Table Name',rowcnt 'Total Number of Rows' from sysindexes i
inner join  sysobjects o on i.id=o.id
where indid<2
and o.xtype='U'
Order by 'Total Number of Rows' desc

No comments:

Post a Comment