Make an existing MySQL column auto_increment

Modify an existing column to make it auto increment.

  1. ALTER TABLE [table name] MODIFY [column] int NOT NULL AUTO_INCREMENT

Enjoy this article?

Get my best content on Javascript, CSS, PHP & Git before anyone else and special bonuses.

Get started


Conquer Drupal 8 Module Development

Don't struggle to conquer Drupal 8 module development. Action packed lessons where you will work along building your own real world modules.

20% launch discount available now!

Find out more


Add new comment