Find number of tables in Redshift

Query below returns total number of tables in current database.

Query

select count(*) as tables
from information_schema.tables
where table_type = 'BASE TABLE';

Columns

  • tables - number of tables in a database

Rows

Query returns just one row.

Sample results