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

后端 未结 5 929
滥情空心
滥情空心 2020-12-30 10:17

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?

5条回答
  •  [愿得一人]
    2020-12-30 10:54

    You can add it like this

    ALTER TABLE your_table
    MODIFY some_column INT NOT NULL AUTO_INCREMENT;
    

提交回复
热议问题