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;

Check out my in-depth, practical Web Development Courses!

(all 50% off with the coupon code POSITIVEVIBRATIONS)