In this tutorial you'll learn how to create database in PostgreSQL using both-
- SQL shell (command line)
- pgAdmin4 (Graphical interface)
Creating DB using SQL shell
Command that you can use to create a new DB is-
CREATE DATABASE dbname;
- Open SQL shell, provide the user name and password to connect to server.
- Type command CREATE DATABASE testdb; to create a database named testdb.