Tech Blog‎ > ‎

How many tables do I have in a database (MS SQL)

posted Aug 16, 2012, 6:07 AM by Victor Zakharov   [ updated Sep 18, 2012, 9:25 AM ]
Here is a one-liner: 

SELECT COUNT(*) FROM (SELECT DISTINCT table_name FROM INFORMATION_SCHEMA.TABLES) a
Comments