Set AUTO_INCREMENT value programmatically

前端 未结 4 2040
我在风中等你
我在风中等你 2021-01-06 05:20

So this works...

ALTER TABLE variation AUTO_INCREMENT = 10;

But I want to do this;

ALTER TABLE variation AUTO_INCREMENT = (         


        
4条回答
  •  余生分开走
    2021-01-06 06:19

    Set your auto_increment in 1, zero doesn't work, automatically mysql set the maximum value to the next value for index value.

    ALTER TABLE table AUTO_INCREMENT = 1
    

提交回复
热议问题