Skip to content
Advertisement

SQL to check if database is empty (no tables)

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!

Advertisement

Answer

will return the actual number of tables (or views) in your DB. If that number is 0, then there are no tables.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement