Java, Python, Database, Flutter, Matlap, Micorcontroller, Tutorials, Swing Framework

Hancie e-Learning Studio

Learn Java, Learn HTML, CSS, PHP, Javascript, Python Tutorials || Download program source codes || Java Project and Source code available here || All types error troubleshooting tips available here

MySQL AUTO INCREMENT Field

 

What is an AUTO INCREMENT Field?

Auto-increment allows a unique number to be generated automatically when a new record is inserted into a table. Often this is the primary key field that we would like to be created automatically every time a new record is inserted.

CREATE TABLE Persons (
    Personid int NOT NULL AUTO_INCREMENT,
    LastName varchar(255NOT NULL,
    FirstName varchar(255),
    Age int,
    PRIMARY KEY (Personid)
);

To let the AUTO_INCREMENT sequence start with another value, use the following SQL statement:

ALTER TABLE Persons AUTO_INCREMENT=100;


Welcome all to Hancie e-learning studio
Friends,
I have brought an e-learning platform for you from where you can teach internet, website, programming language, error troubleshooting, etc. Blogger, WordPress templates, themes are available for free on this website, which are not charged for downloading, so that you can earn money by blogging using such templates and this is not a difficult task and this You can do it now. You keep uploading new posts by us and keep taking advantage of this website. The aim of which is to spread the knowledge related to internet, career, web designing and technology to the people and contribute to the development of the country.