Tamil Nadu Board of Secondary EducationHSC Science Class 12th

Differentiate Unique and Primary Key constraint. - Computer Science

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?

APPEARS IN

Tamil Nadu Board Samacheer Kalvi Class 12th Computer Science Answers Guide
Chapter 12 Structured Query Language (SQL)
Evaluation | Q 2. | Page 230
Share
Notifications

View all notifications


      Forgot password?
View in app×