Check out example codes for "unique key". It will help you in understanding the concepts better.

Code Example 1

CREATE TABLE students  
(  
S_Id int NOT NULL,  
LastName varchar (255) NOT NULL,  
FirstName varchar (255),  
City varchar (255),  
UNIQUE (S_Id)  
)

Code Example 2

ALTER TABLE students  
ADD UNIQUE (S_Id)

Learn ReactJs, React Native from akashmittal.com