List tables in PostgreSQL database schema

Queries below list tables in a specific schema.

Query

select t.table_name
from information_schema.tables t
where t.table_schema = 'schema_name'  -- put schema name here
      and t.table_type = 'BASE TABLE'
order by t.table_name;

Columns

  • table_name - name of the table

Rows

  • One row represents one table
  • Scope of rows: all tables in the schema
  • Ordered by table name

Sample results

Result shows list of tables in dbo schema of our pagila database:

You could also get this

Get this interactive HTML data dictionary in minutes with Dataedo.

See live HTML data dictionary sample

Try for free

Comments are only visible when the visitor has consented to statistics cookies. To see and add comments please accept statistics cookies.
0
There are no comments. Click here to write the first comment.