AI Workshop: learn to build apps with AI →
PostgreSQL: How to create a PostgreSQL database

Join the AI Workshop and learn to build real-world apps with AI. A hands-on, practical program to level up your skills.


When you have PostgreSQL installed you can create a new database by opening the console with:

psql postgres

and then running the command CREATE DATABASE:

CREATE DATABASE databasename;

Don’t forget the semicolon ;

You’ll then see the newly created database by running the \l command.

Lessons in this unit:

0: Introduction
1: Introduction to PostgreSQL
2: How to install PostgreSQL on macOS
3: ▶︎ How to create a PostgreSQL database
4: Navigating Databases in PostgreSQL
5: PostgreSQL User Permissions
6: Tables and Data Types
7: Where to host a PostgreSQL database
8: PostgreSQL vs MySQL
9: Troubleshooting PostgreSQL
10: Vercel Postgres, no transactions?
11: Set up Lucia Auth for local Postgres DB vs Vercel Postgres
12: Connect to Postgres local vs Vercel Postgres with Kysely