Interview Preparation Technical Interview Subjective
May 10, 2013

What is the difference between Primary Key and Unique key?

Detailed Explanation

Primary Key: A column in a table whose values uniquely identify the
rows in the table. A primary key value cannot be NULL.


Unique Key: Unique Keys are used to uniquely identify each row in the
table. There can be one and only one row for each unique key value. So
NULL can be a unique key.There can be only one primary key for a table but there can be more
than one unique for a table.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback