Find a table by the name in Redshift

Query below finds tables with specific name in all schemas in a database. In this case it searches for 'sales' table.


select table_schema,
from information_schema.tables
where table_name = 'sales'
      and table_schema not in ('information_schema', 'pg_catalog')
      and table_type = 'BASE TABLE'
order by table_schema;


  • table_schema - name of schema table was found in
  • table_name - name of table (redundant as it should be exactly the same as provided)


  • One row represents a table
  • Scope of rows: all found tables
  • Ordered by table schema


  1. There migh be more tables than one because different schemas in a database can have tables with the same names

Sample results

There are no comments. Click here to write the first comment.