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

Code Example 1

ALTER TABLE tableName MODIFY COLUMN id INT; /* First you should drop auto increment */
ALTER TABLE tableName DROP PRIMARY KEY; /* Dop primary key */
ALTER TABLE tableName ADD PRIMARY KEY (new_id); /* Set primary key to the new column */
ALTER TABLE tableName MODIFY COLUMN new_id INT AUTO_INCREMENT; /* Set auto increment to the new primary key */

Learn ReactJs, React Native from akashmittal.com