Find the Constraint Mistake
Find the Mistake Medium
Question
This CREATE TABLE has a logical issue. Find it:
Code
CREATE TABLE users (
id INTEGER PRIMARY KEY,
email TEXT UNIQUE,
email TEXT NOT NULL
);
Hint
Can you define the same column twice?
Explanation
The email column is defined twice — you cannot have two columns with the same name. Fix: combine them into one definition: email TEXT UNIQUE NOT NULL.
Related Resources
Related Lessons
- Constraints
Learn column definitions.
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.