Wednesday, January 14, 2009

Check total number of records (count(*)) in each table

If you want to check the total number of records in each table of a database, run the following query:

USE
Go
EXEC sp_MSForEachTable 'SELECT count(*) FROM ?'

No comments: