Julia asked this 11 months ago

Count number of tables in GCP MySQL Instance

What is the command for counting number of tables in all the databases ?


go_mongo 11 months ago
1 like

SELECT COUNT(*) FROM information_schema.tables;

Generic command will work on any mysql server not just gcp instance. Above is for all tables in all the databases of the mysql instance. For specific database,

SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = 'dbName';