Re: Change AutoIncrement Value
Posted by:
Jon Roshko
Date: August 21, 2008 02:55PM
I believe if you copy all the values (minus the auto_increment column) to another table then copy them back, all the auto_increment values will be re-generated. I haven't really tested this though.
If you just want to change the auto_increment value, use this:
ALTER TABLE tbl AUTO_INCREMENT = 100;
MySQL auto_increment page:
http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html
- Jon
Subject
Written By
Posted
Re: Change AutoIncrement Value
August 21, 2008 02:55PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.