difference between Primary Key and Unique Key
Both Primary key
and Unique Key
are used to uniquely define of a row in a table.
Primary Key
creates a clustered index
of the column whereas a Unique creates an unclustered index of the column
.
A Primary Key
doesn’t allow NULL value
, however a Unique Key
does allow one NULL value
.