psql show tables code example

Example 1: get all tables postgres

SELECT * FROM pg_catalog.pg_tables;

Example 2: sql show tables

Showing all table: 
show tables;

Showing table data:
SELECT
* or column_names
FROM
table_name;

Example 3: show table postgres command

PostgreSQL show tables command
	
\dt

Example 4: get all tables postgres

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

Example 5: show all tables postgres

\dt
# show list of tables in postgres

Example 6: show details of table postgres

postgres=# \d tablename;

Tags:

Misc Example