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

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

    To use the GUI:

    Click the STRUCTURE tab to see the list of existing fields

    To set a field as the PRIMARY FIELD, click the gold key -- it will turn silver.

    To set a field (usually the same field) as auto-increment:
    a. Click CHANGE for that field
    b. Look to the far right and checkmark the AI box
    c. Click SAVE button

提交回复
热议问题