Tuesday 12 June 2012

What is the difference between Primary Key and Unique Key


  • In a table there can be only one column on which we implement Primary Key Constraint while we can implement Unique Key Constraints on more than one column.
  • There can be no NULL value in column having Primary Key Constraint while NULL value can be allow in column having Unique Key Constraint.
  • In column having Primary Key Constraint Cluster Index created by default while in column having Unique Key Constraint NonCluster Index creates by default.

No comments:

Post a Comment