How to list tables in the current database using PostgreSQL

🆕 🔜 Check this out if you dream of running a solo Internet business 🏖️

A quick explanation of how to list tables in the current database inside the `psql` tool in PostgreSQL, or using SQL

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;