Module 5 of 16
SQL DDL: Constraints
Protect data with NOT NULL, UNIQUE, CHECK, PRIMARY KEY and FOREIGN KEY rules.
Lesson recording
Your progress
Opening a slide marks it as viewed. Progress is saved in this browser.
Completed0%
- Slides opened
- 0
- Total slides
- 0
- Est. time
- —
What you will learn
Choose a topic to jump to its slide.
SQL DDL: Constraints, Step by Step
SQL dialect: The reference syllabus teaches Microsoft SQL Server. Interactive code on this page runs PostgreSQL (PGlite) locally in your browser; T-SQL differences are explained where they matter.
Read the "In plain English" box first, then look at the code. Every slide runs on a real PostgreSQL database in your browser, and the last panel shows what your code changed. Edit anything and press Run: each Run starts from a clean database, so you cannot break anything. Keys: ← → change slide, Space play/pause, R run again.
CONSTRAINTS