SQL: List of database tables, with count of records.

Use the script below 1, to return a list of database tables (the schema and table name) along with a count of the records within each table. This can come in useful if you are trying to compare databases.

As SQL Server 2000 doesn’t use Schema Names, I have adapted the above code to work with SQL Server 2000:

  1. Please ensure you test any script taken from my website on a test/development machine, before running on a production server.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

CJayMead's SQL Server, Endeca, MS Office Help © 2018