Friday, November 25, 2022

How to add auto-increment to column in MySQL database using PhpMyAdmin?

 You can add auto_increment to a column in MySQL database with the help of ALTER command.

The syntax is as follows −

ALTER TABLE yourTableName
MODIFY yourColumnName INT NOT NULL AUTO_INCREMENT;

No comments:

Post a Comment