Query Quest PostgreSQL Course

Create a table

Tables group related facts into rows and columns. Each column has a name and a data type. A primary key gives every row a unique identity.

What you'll learn

SERIAL generates numeric IDs. TEXT stores words. INTEGER stores whole numbers. NOT NULL means a value is required.

Your mission

Create an inventory table with id as SERIAL PRIMARY KEY, item_name as TEXT NOT NULL, and quantity as INTEGER.

Enable JavaScript to run SQL in the interactive lesson.