Monday, January 27, 2014

[PostgreSQL] Query to check no of tables in a database

Often times we are needed to check if any database we are connected to has any tables or not. In this case following query proves helpful:

select count(*) from information_schema.tables where table_schema = 'public'


No comments:

Post a Comment