createdb mydb

Category: Databases & SQL

createdb mydb

Create a new PostgreSQL database

A convenience wrapper around CREATE DATABASE that uses your current user as owner. It fails if mydb already exists; --owner assigns a different owner. Related: dropdb mydb, and \l to list databases.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.