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

Add new comment