Ndlopfu PostgreSQL
This is my PostgreSQL reference, how to's and things I've learned on my way...
Monday, 25 June 2018
How get a list of all the tables in a PostgreSQL database
You can get a list of all the tables in a PostgreSQL database with the built in
psql
functions or by executing a query:
PSQL
Open psql and log into the database for which you want the list of tables
Type
\dt
and press Enter
Query
You can also query pg_tables to get a list of tables in a database. You can filter on the schema name in the where clause:
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment