Advertisement Remove all ads
Advertisement Remove all ads
Advertisement Remove all ads
Distinguish Between
Differentiate Unique and Primary Key constraint.
Advertisement Remove all ads
Solution
Unique Key Constraint | Primary Key Constraint |
The constraint ensures that no two rows have the same value in the specified columns. | This constraint declares a field as a Primary Key which helps to uniquely identify a record. |
The UNIQUE constraint can be applied only to fields that have also been declared as NOT NULL. | The Primary Key does not allow NULL values and therefore a field declared as Primary Key must have the NOT NULL constraint. |
Concept: SQL Commands and Their Functions
Is there an error in this question or solution?