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

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

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


Pssst! Also check my latest YouTube video



I am writing a book on how to create a successful blog as a developer.
It will be released late February.
Signup to my newsletter to get 2/3 free chapters in your inbox in the next few weeks!