🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Keys and Constraints: all 10 questions

Quiz: Keys and Constraints · Question 8 of 10

Which is a difference between a primary key and a unique key?

Which is a difference between a primary key and a unique key?

  1. A.A unique key cannot have duplicates but a primary key can
  2. B.A table can have many primary keys but only one unique key
  3. C.They are exactly the same
  4. D.A primary key can never be NULL, while a unique key usually allows a NULL
Answer & explanation

Correct answer: A primary key can never be NULL, while a unique key usually allows a NULL

A table has one primary key (NOT NULL) and may have many unique keys.

Can you get the rest right without peeking?

Take the timed Quiz: Keys and Constraints quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →