SQL Server, we have two keys which distinctively or uniquely identify a record in the database. Both the keys seems identical, but actually both are different in features and behaviours. In this article, I would like to share the key difference between primary key and unique key. For more help about keys in SQL Server refer the article Different Types of SQL Keys.
CREATE TABLE Employee
Emp_ID int PRIMARY KEY,
Emp_Name varchar (50) NOT NULL,
Emp_Sal int UNIQUE,
Location int NULL