Created
April 29, 2019 07:10
-
-
Save fhdalikhan/2eba73a41913c421053f2ab82c5cdc8b to your computer and use it in GitHub Desktop.
SQL to count all databases and tables in 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
# COUNT ALL DATABASES | |
SELECT COUNT(*) FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mysql','information_schema'); | |
# COUNT ALL TABLES | |
SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment