mysqldatabasephpmyadmin

How to add auto-increment to column in mysql database using phpmyadmin?


I've been trying to add auto-increment to one of my columns (basically an ID) but I can't find the auto-increment option for my column. Any idea where it is?


Solution

  • You can add it like this

    ALTER TABLE your_table
    MODIFY some_column INT NOT NULL AUTO_INCREMENT;