How does a UNIQUE constraint differ from a primary key?
Reveal the answer and explore the explanation.
11MediumHigh priorityHow does a UNIQUE constraint differ from a primary key?
Answer
MediumHigh priority
How does a UNIQUE constraint differ from a primary key?
Answer
Prevents duplicate combinations of constrained columns, with null behavior depending on database semantics.
Practical example
Ensure one saved progress row per user and lesson.
Reference: Further reading ↗