Return count of all the rows of all the tables

exec sp_MSforeachtable 'select count(*) as nr_of_rows, ''?'' as table_name from ?'

This will show table name and sum of all the rows of that table

Comments

Popular posts from this blog

Grouping Sets, With Rollup and With Cube example

Adding Page brake aganist group values

To Get All the Names of tables and Databases their data have changed in last 24 Hours And Backup those databases