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

Code Example 1

sqlite uniue
-------------------------        
CREATE TABLE contacts(
  contact_id INTEGER PRIMARY KEY,
  first_name TEXT,
  last_name TEXT,
  email TEXT NOT NULL UNIQUE
);

Learn ReactJs, React Native from akashmittal.com