Following query displays the total number of rows for each table in a database.
- Open SSMS
- Select database
- Execute the below Query:
select sysobjects.name 'Table Name',rowcnt 'Total # Rows' from sysindexes
inner join sysobjects on sysindexes.id= sysobjects.id
where indid < 2
Order by 'Total # Rows' desc
The above query will return the list of all the tables in a database along with total numbers of rows in it.