Created
July 13, 2012 18:53
-
-
Save vladimir-light/3106668 to your computer and use it in GitHub Desktop.
Count all tables in a specific SCHEMA - MySQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- Only TABLES | |
-- | |
SELECT COUNT(*) AS `all_tables` | |
FROM information_schema.`TABLES` | |
WHERE table_schema = '<schema_name>' | |
AND table_type = 'BASE TABLE' | |
-- | |
-- EVERYTHING: TABLES, VIEWS, ETC | |
-- | |
SELECT COUNT(*) AS `all_tables` | |
FROM information_schema.`TABLES` | |
WHERE table_schema = '<schema_name>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment