English
Tamil Nadu Board of Secondary EducationHSC Science Class 12

Differentiate Unique and Primary Key constraint. - Computer Science

Advertisements
Advertisements

Question

Differentiate Unique and Primary Key constraint.

Distinguish Between

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.
shaalaa.com
SQL Commands and Their Functions
  Is there an error in this question or solution?
Chapter 12: Structured Query Language (SQL) - Evaluation [Page 230]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 12 TN Board
Chapter 12 Structured Query Language (SQL)
Evaluation | Q 2. | Page 230
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×