List:General Discussion« Previous MessageNext Message »
From:Dyego Souza do Carmo Date:October 25 2002 3:43pm
Subject:Re: InnoDB and auto_increment fields
View as plain text  
Dobrý den,
sexta-feira, 25 de outubro de 2002, 14:26:05, napsal jste:

CB> sql, query (*sigh*, I hate this filter)

CB> I have an auto_increment key set up on my InnoDB table.
CB> Whenever I delete all the records, the number isn't reset.
CB> However, for my ISAM tables, whenever I delete all the 
CB> records, the auto_increment number is reset.
CB> Is there a reason for this in InnoDB?  Is there a way that I
CB> can reset the auto_increment number when all the records
CB> are deleted?  I have a temporary table that has records
CB> added and deleted all the time.  I wouldn't want the record 
CB> number to eventually reach the ceiling for the datatype of 
CB> the field.

CB> Any insight would be greatly appreciated.

CB> Chris

try exec this query:

alter table <TABLE_NAME> auto_increment = 0;

  ++  Dyego Souza do Carmo   ++           Dep. Desenvolvimento   
                 E S C R I B A   I N F O R M A T I C A
The only stupid question is the unasked one (somewhere in Linux's HowTo)
Linux registred user : #230601
$ look into "my eyes"
look: cannot open my eyes
               Reply: dyego@stripped

ConnectionArthur25 Oct
  • Re: ConnectionJocelyn Fournier25 Oct
  • phpmyadminMitchell Wright25 Oct
    • RE: phpmyadminEd Carp25 Oct
      • Re: phpmyadmin (OT)Thomas Seifert25 Oct
        • Re: phpmyadmin (OT)Mitchell Wright25 Oct
      • RE: phpmyadminJohn Chang25 Oct
        • RE: phpmyadminJeroen Geusebroek26 Oct
        • RE: phpmyadminEd Carp26 Oct
    • Re: phpmyadmin (OT)Mark Stringham25 Oct
    • InnoDB and auto_increment fieldsChris Boget25 Oct
      • Re: InnoDB and auto_increment fieldsDyego Souza do Carmo25 Oct
      • Re: InnoDB and auto_increment fieldsPaul DuBois26 Oct
    • Re: InnoDB and auto_increment fieldsChris Boget25 Oct
      • Re: InnoDB and auto_increment fieldsPete Harlan28 Oct
    • Re: InnoDB and auto_increment fieldsChris Boget28 Oct
Re: phpmyadminJan Steinman27 Oct