Unique key is similar to primary key and does not allow duplicate values in the column. It has below differences in comparison of primary key:
The unique key can be defined as a set of one or more fields/columns of a table that have the capability to uniquely identify a record in the database table.
We can have other fields also in a table beyond primary key which is also able to uniquely identify the record. It can accept only one null value and it cannot have duplicate values in it.