Skip to content

how to get postgresql command prompt to use database

Srikant kumar edited this page Dec 14, 2018 · 1 revision

#To initialise the command prompt:

sudo -u postgres psql

how to create database

create database mydb;

#To show all database list

\l

#press q to quit

#to connect to database

\c mydb;