QUESTION 11 OF 15

How does a UNIQUE constraint differ from a primary key?

Reveal the answer and explore the explanation.

11
MediumHigh priority

How does a UNIQUE constraint differ from a primary key?

Answer
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 ↗

Last 30 min revisionHigh-yield interview Q&As