Search code examples
mysqlauto-increment

how to set a new auto increment value in existing table field?


i have a table with a order_id field set to auto increment. Its currently about at 325

but i need to start all the newly added entries to start off with 1000,1001..... rather than continuing with 326.

i need to keep the existing IDs the same and change only the newly adding values.

can someone please help me with this?


Solution

  • ALTER TABLE table_name AUTO_INCREMENT = 1000;