In this article I am going to show you how set auto increment while creating a table.As you know we need a ID field in a table which is unique and its need to be auto increment.If you set ID as auto increment then you don’t need to be increment its value from your coding.So if we set auto increment It’s value will be increase automatically by plus one.
CREATE TABLE user (
ID int NOT NULL AUTO_INCREMENT,
firstname varchar(265) NOT NULL,
PRIMARY KEY (ID)