Skip to content

Instantly share code, notes, and snippets.

@sathish-io
Created September 3, 2014 17:23
Show Gist options
  • Save sathish-io/23723e05fdab920130a1 to your computer and use it in GitHub Desktop.
Save sathish-io/23723e05fdab920130a1 to your computer and use it in GitHub Desktop.
Basic postgresql commands
Basic postgresql commands:
\l - to list all database.
\db - to list all tables in a db.
\d <tablename> - to describe a table
Create new database
CREATE DATABASE testdatabase;
Switch to database
\c testdatabase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment