List:General Discussion« Previous MessageNext Message »
From:Egor Egorov Date:January 28 2004 1:52pm
Subject:Re: Resetting auto_increment field in an INNODB table
View as plain text  
"Hassan Shaikh" <hassan@stripped> wrote:
> Hi,
> 
> How do I reset an AUTO_INCREMENT column? My table type is InnoDB and
> the method mentioned in the manual is not applicable. I am using MySQL
> 4.0.17.

If you want to start auto_increment sequence with value bigger than current counter value,
you can just add dummy row and specify explicitly column value equal to needed_value-1.
Then delete this row.
Otherwise you should recreate the table.



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   Egor.Egorov@stripped
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com



Thread
Resetting auto_increment field in an INNODB tableHassan Shaikh26 Jan
  • Re: Resetting auto_increment field in an INNODB tableEgor Egorov28 Jan
  • Re: Resetting auto_increment field in an INNODB tableChris Boget28 Jan
    • Re: Resetting auto_increment field in an INNODB tableEgor Egorov28 Jan