"Kim G. Pedersen" <[EMAIL PROTECTED]> wrote: >> "Kim G. Pedersen" <[EMAIL PROTECTED]> wrote: >>> >>> I once red that using "truncate table xx" instead of "delete from xx" >>> should reset autoincrement , but it seem not to happend. >>> >>> but when I try to insert data with "insert" or "load data in " >>> it remember the old autoincrement value. >>> >>> from manual : >>> "Truncate operations drop and re-create the table, which is much faster >>> than deleting rows one by one. " >>> >>> seems not , when I drop table and the create table again it works >>> perfect. >>> > > >> >> What table type do you use? TRUNCATE TABLE reset auto_increment value for >> MyISAM table, but not for InnoDB. >> >> > > thanks Egor > > I use InnoDB , so that explains it :-) > > what Are the most easy way to reset the value in innodb 4.014
If you want to reset auto_increment value, you should recreate table. If you want to start sequence from particu lar value insert a dummy row with value=wanted_value-1 and delete this row. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]