Changing the current count of an Auto Increment value in MySQL?

后端 未结 4 1091
无人及你
无人及你 2020-12-25 10:46

Currently every time I add an entry to my database, the auto increment value increments by 1, as it should. However, it is only at a count of 47. So, if I add a new entry, i

4条回答
  •  一个人的身影
    2020-12-25 11:31

    You can also set it with the table creation statement as follows;

    CREATE TABLE mytable (
         id int NOT NULL AUTO_INCREMENT,
         ...
         PRIMARY KEY (ID)
    )AUTO_INCREMENT=10000;
    

    Hope it helps someone.

提交回复
热议问题