Re-sequencing an Auto_Increment column
I have a开发者_如何学Gon Auto_Increment column starting at 1(I already have about 100 records) I want to re-sequence this column so that it will start at 1000
Assuming id is the autoincrement column and its smallest value is 1 this should do:
UPDATE table SET id = 999 + id
Though I am not sure this is a sensible thing to do ;)
I don't have MySQL installed to test but I guess
ALTER TABLE Table_Name AUTO_INCREMENT=1000;
should do that
精彩评论