Re: Reseting the auto-increment number in a MySQL database.
| From: | Stuart Dallas | Date: | Wed, 26 Jun 2013 17:13:24 +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-321497@lists.php.net to get a copy of this message | ||
On Wednesday, 26 June 2013 at 18:07, Tedd Sperling 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;
>
ALTER TABLE tbl AUTO_INCREMENT = 2301;
-Stuart
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/