Skip to content

Instantly share code, notes, and snippets.

@gduverger
Last active February 22, 2018 19:26
Show Gist options
  • Select an option

  • Save gduverger/fc4401cdd75032051975 to your computer and use it in GitHub Desktop.

Select an option

Save gduverger/fc4401cdd75032051975 to your computer and use it in GitHub Desktop.
PSQL
\list # lists all databases
create database database_name; # create a database
DROP DATABASE database_name; # drop database
\c db_name # connect to a certain database
\dt # lists all tables in the current database
\d table_name # view table
DROP TABLE table_name; # drop table
\q # exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment