unicodeveloper / psql-cheatsheet

Postgresql psql cheatsheet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

psql-cheatsheet

Psql cheatsheet

  • \l or \list - List all databases
  • \c or \connect db_name - Connect to a particular database
  • use db_name - Connect or use a particular database
  • \dt - List all the tables in a particular database
  • DROP schema public cascade; - Drop all tables in the database
  • CREATE SCHEMA public; - Creates the schema in the database. Run this after dropping all the tables using the command above this.

About

Postgresql psql cheatsheet