E
x
c
e
l
P
T
P

What is the difference between Primary Key and Unique key?

March 4, 2014

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.