Selecting a database in PostgresSQL
- open psql
psql -U pg - list databases
\listor\l - select a database
\connect DBNAMEor\c DBNAME - list all database tables
\dtusing thesearch_path- list all database tables regardless of
search_pathby\dt *. - describe the table to see schema
\d TABLE_NAME - more info with
\d+
- list all database tables regardless of
- show data
select * from TABLE