Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (6.1k points)

What is comparable to show tables (from MySQL) in PostgreSQL?

1 Answer

0 votes
by (12.7k points)
edited by

From the psql command-line interface,

To begin with, select your database

\c database_name

Then, this gives all the tables in the current schema:

\dt

Programmatically (or from the psql interface also, of course):

SELECT * FROM pg_catalog.pg_tables;

The system tables live in the pg_catalog database.

Join the SQL Training course now if you want to gain more knowledge in SQL.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...