| Type | Description |
|---|---|
| INTEGER | Whole numbers |
| SERIAL | Auto-incrementing |
| TEXT | Variable-length string |
| BOOLEAN | true/false |
| TIMESTAMP | Date + time |
| JSONB | Binary JSON |
| UUID | Unique ID |
| DECIMAL(p,s) | Exact numeric |
Lesson 15 of 22 · PostgreSQL
Data Types
Learn PostgreSQL data types (SERIAL, TEXT, TIMESTAMP, JSONB and more), then build a table with them.
Your challenge
Create a table events with id (SERIAL primary key), title (TEXT, NOT NULL), starts_at (TIMESTAMP) and details (JSONB). Add one event titled Launch, starting 2025-01-01 09:00, with details {"room": "A"}.
Solve it in your browserFree, no sign-up. The PostgreSQL database runs in your browser; your answer is checked instantly, with hints if you need them.