I need to check if a database is totally empty (no tables) using an SQL query. How can this be done?
Thanks for the help!
To get a list of all databases without tables in MySQL:
use information_schema select schema_name from `schemata` s left join `tables` t on s.schema_name = t.table_schema where t.table_name is null ;
Cheers, Christian