Check out example codes for "set column as unique in sql server". It will help you in understanding the concepts better.

Code Example 1

USE AdventureWorks2012;  
GO  
CREATE TABLE Production.TransactionHistoryArchive4  
 (  
   TransactionID int NOT NULL,   
   CONSTRAINT AK_TransactionID UNIQUE(TransactionID)   
);   
GO

Code Example 2

ALTER TABLE Persons
ADD UNIQUE (ID);

Learn ReactJs, React Native from akashmittal.com