List:General Discussion« Previous MessageNext Message »
From:Vivek Khera Date:March 20 2000 5:48pm
Subject:RE: Re-ordering AUTO_INCREMENT ID
View as plain text  
>>>>> "CHP" == Carsten H Pedersen <carsten.pedersen@stripped>
> writes:

CHP> So your best bet would probably be:
CHP> 1) ALTER the table and add a new AUTO_INCREMENT field;
CHP> 2) Delete the old AUTO_INCREMENT column
CHP> 3) Rename the new AUTO_INCREMENT column to the name of the old one.

But you can only have one auto-increment field per table.

You need to drop the old one then re-create it.  Preferably while no
other clients are using this table.

Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: khera@stripped       Rockville, MD       +1-301-545-6996
PGP & MIME spoken here  
Re-ordering AUTO_INCREMENT IDJimmy Moore20 Mar
  • Re: Re-ordering AUTO_INCREMENT IDsinisa20 Mar
  • RE: Re-ordering AUTO_INCREMENT IDCarsten H. Pedersen20 Mar
    • RE: Re-ordering AUTO_INCREMENT IDVivek Khera20 Mar
      • RE: Re-ordering AUTO_INCREMENT IDCarsten H. Pedersen21 Mar