List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:July 22 1999 6:45pm
Subject:Re: auto_increment question
View as plain text  
>I have a table that has an auto_increment column. Whenever a row is deleted
>from the table the column values do not reconstruct themselves. I.e. if
>there were 1,2,3,4,5 and row 3 was deleted they would appear 1,2,4,5 but I
>want them to be 1,2,3,4. How would I do that?

That's not how AUTO_INCREMENT works, nor how it's supposed to work.
You'll have to change all those records yourself.  Doesn't sound fun.

You could create a temporary table with the same structure, select
all the columns *except* the AUTO_INCREMENT column into the temporary
table, then replace the original table with the temporary one, I
suppose.

-- 
Paul DuBois, paul@stripped
Thread
auto_increment questionDenis Voitenko22 Jul
  • Re: auto_increment questionNem W Schlecht22 Jul
    • Re: auto_increment questionDenis Voitenko23 Jul
      • Re: auto_increment questionThimble Smith23 Jul
    • Re: auto_increment questionDenis Voitenko23 Jul
      • Re: auto_increment questionThimble Smith23 Jul
      • Re: auto_increment questionBill Gerrard23 Jul
        • timestamp (before: auto_increment question)Denis Voitenko23 Jul
          • Re: timestamp (before: auto_increment question)Thimble Smith23 Jul
          • Re: timestamp (before: auto_increment question)Paul DuBois23 Jul
  • Re: auto_increment questionPaul DuBois22 Jul