Show Databases, Tables and Columns in PostgreSQL
Man….why is it that every time I stop using PostgreSQL for more than a month I immediately forget how to list tables and columns? Here’s a listing for posterity.
Show Databases
MySQL:
SHOW DATABASES;
PostgreSQL
\l
Show Tables
MySQL:
SHOW TABLES;
PostgreSQL
\d
Show Columns
MySQL:
SHOW COLUMNS;
PostgreSQL
\d+ tablename
Show Yourself Out (exit)…
Continue reading: Show Databases, Tables and Columns in PostgreSQL