02 May 2014

PSQL Cheatsheet

start

psqlStart an interactive terminal

database

\listList databases
\connect <db>Switch connection
SELECT current_database();Show database connection

tables

\dList tables
\d <table>List table columns
SELECT current_database();Show database connection

help

\?List backslash commands
\helpList SQL commands

quit

\qQuit