Re: Reseting the auto-increment number in a MySQL database.

From: Date: Wed, 26 Jun 2013 17:12:27 +0000
Subject: Re: Reseting the auto-increment number in a MySQL database.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-321496@lists.php.net to get a copy of this message
You can try this: *ALTER TABLE tbl AUTO_INCREMENT = 100;* * * *Source: *http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html (never did it myself, though) On Wed, Jun 26, 2013 at 2:07 PM, Tedd Sperling <tedd@sperling.com> wrote: > Hi gang: > > I have a client where their next auto-increment number just jumped from > 2300 to 1000000000 for reasons not understood. They want it set back. > > Options such as dropping the primary key and rebuilding the index is NOT > possible -- this is a relational table thing. > > So, is there a way (programmatically) to set the next number in an > auto-increment? > > Something like: > > alter table abc auto_increment = 2301; > > Any ideas of why this happened? > > Cheers, > > > tedd > > _____________________ > tedd@sperling.com > http://sperling.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#321496) next »