mysql auto_increment by 5?

后端 未结 3 2023
予麋鹿
予麋鹿 2020-12-06 15:01

I\'m running into a really, really, really weird problem with mysql.

I have a primary key, \"id\". It\'s set to auto increment. Problem is, first entry started at \"

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-06 15:13

    The auto increment is probably set to 5. Try:

    ALTER TABLE YourTable AUTO_INCREMENT = 1;
    

    You can retrieve the current setting with:

    SHOW TABLE STATUS LIKE 'YourTable'
    

    See the MySQL docs for more details.

提交回复
热议问题