Primary and Unique Key

Difference between Primary key and Unique Key
No. Primary Key Unique Key
1 Can be only one in a table Can be more than one unique key in one table.
2 It never allows null values Unique key can have null values
3 Primary Key is unique key identifier and can not be null and must be unique. It can’t be candidate key
4 Unique key can be null and may not be unique.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>