# How to list tables in the current database using PostgreSQL

> Learn how to list the tables in the current PostgreSQL database using the dt command in psql, or a SQL query against the information_schema.tables view.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2020-01-04 | Topics: [Database](https://flaviocopes.com/tags/database/) | Canonical: https://flaviocopes.com/postgres-how-to-list-tables-database/

To list the tables in the current database, you can run the `\dt` command, in `psql`:

![Terminal showing psql dt command output with table list displaying Schema, Name, Type, and Owner columns for 5 database tables](https://flaviocopes.com/images/postgres-how-to-list-tables-database/Screen_Shot_2019-12-19_at_10.25.41.png)

If you want to perform an SQL query instead, run this:

```sql
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
ORDER BY table_name;
```

![Terminal showing SQL query result listing table names from information_schema.tables with 5 table names displayed](https://flaviocopes.com/images/postgres-how-to-list-tables-database/Screen_Shot_2019-12-19_at_10.28.19.png)
