Unique keys accept null values whereas primary keys not.

When any field declared as a unique key ,it can be null and can contain same value more than one time, but if that field declared as a primary key that will not be null and can not contain duplicate data. Following points are more brings out more differences between Prinmary key and Unique key:

  1. Unique keys accept null values where as Primary keys not
  2. Unique keys contains duplicate data where as primary keys are not
  3. Unique keys generates Non-clustered index where as Primary keys contains clustered-index
  4. A table contains more than one unique key whereas a table contain only one primary key.

Similarity between Primary key and Unique Key in Table:

  1. A foreign key can be referenced by a primary key and Unique key also.