Check out example codes for "create id to primary using query". It will help you in understanding the concepts better.

Code Example 1

ALTER TABLE lead_offer_notes ADD PRIMARY KEY (id);

Learn ReactJs, React Native from akashmittal.com