Julia asked this 1 month ago

Count number of tables in GCP MySQL Instance

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

 


go_mongo 1 month 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';