CBSE Class 12 Computer Science Question 26 of 41

Relational Database and SQL — Question 26

Back to all questions
26
Question

Question 19

Differentiate between Primary key and Unique constraints.

Answer
Primary keyUnique constraints
A Primary key is a set of one or more attributes/fields which uniquely identifies a tuple/row in a table.UNIQUE constraint ensures that no two rows have the same value in the specified column(s).
Primary Keys do not allow NULL values.Unique Constraint allows NULL values.
There can be only one Primary Key in a table.Multiple Unique Constraints can exist in a table.