MdFarzan
MdFarzan

Reputation: 390

Auto increment a field in mysql after creation of table

How to apply a column to be auto-increment after creating the table in mysql? I have googled it, but I got only table level results.

Upvotes: 0

Views: 39

Answers (1)

MdFarzan
MdFarzan

Reputation: 390

It's applied by altering the table. MYSQL command is: ALTER TABLE table_name MODIFY col_name INT AUTO_INCREMENT;

Upvotes: 2

Related Questions