how to repopulate/recreate autoincrement in mysql

Posted by JPro on Stack Overflow See other posts from Stack Overflow or by JPro
Published on 2010-03-16T13:24:06Z Indexed on 2010/03/16 13:26 UTC
Read the original article Hit count: 343

Filed under:

I want to know if I can repopulate the autoincrement value in mysql.

Because, I have records that look similar:

ID Name
1  POP
3  OLO
12 lku

Basically , I want a way to update the ID to this

ID Name
1  POP
2  OLO
3  lku

Is there any way to do this in mysql?

Thanks.

© Stack Overflow or respective owner

Related posts about mysql