Oct 4, 2013

Count number of tables in a SQL Server database



. It's quite simple. Just use the information_schema.tables
USE YOURDBNAME  ex: Use Vamsi
SELECT COUNT(*) from information_schema.tables
WHERE table_type = 'base table'

' Will return you the count of the tables in the database

No comments:

Post a Comment