Complete PRIMARY KEY
Fill in the Blank Easy
Question
Fill in the blank to make id the primary key:
Code
CREATE TABLE users (
id SERIAL ___ KEY,
name TEXT NOT NULL
);
Hint
This constraint uniquely identifies each row.
Explanation
PRIMARY KEY is the constraint that uniquely identifies each row. The value must be unique and not NULL. SERIAL auto-generates values.
Related Resources
Related Lessons
- Constraints
Learn PRIMARY KEY.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.