15 September 2010

Count number of tables in a SQL Server database

Count number of tables in a SQL Server database

USE YOURDBNAME
SELECT COUNT(*) from information_schema.tables
WHERE table_type = 'base table'

No comments:

Post a Comment

Comments Welcome