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

后端 未结 5 908
滥情空心
滥情空心 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:39

    The SQL script is correct

    ALTER TABLE your_table MODIFY some_column INT NOT NULL AUTO_INCREMENT;
    

    but if you try so make before in the visual mode, with the mysql version 4.7.4, in the struct of the table

    Appear when you create the table one option to say "A_I" , if you put your mouse appear message with AUTO_INCREMENT (The version of the foto is in Spanish version)

提交回复
热议问题