Check out example codes for "alter table auto_increment". It will help you in understanding the concepts better.

Code Example 1

ALTER TABLE ALLITEMS CHANGE itemid itemid INT(10)AUTO_INCREMENT PRIMARY KEY;

Code Example 2

CREATE TABLE Persons
(

    
  Personid int IDENTITY(1,1) PRIMARY KEY,

   
LastName varchar(255) NOT NULL,

   
FirstName varchar(255),

   
Age int

);

Learn ReactJs, React Native from akashmittal.com