Under mysql 5.0.18 you can do something like:
// get the current value of the auto_increment counter
mysql> select @@auto_increment_offset;
+-------------------------+
| @@auto_increment_offset |
+-------------------------+
| 1105 |
+-------------------------+
1 row in set (0.00 sec)
// set it to your required value
mysql> set @@auto_increment_offset = 201;
Query OK, 0 rows affected (0.01 sec)
// make sure it is set to what you want it to be
mysql> select @@auto_increment_offset;
+-------------------------+
| @@auto_increment_offset |
+-------------------------+
| 201 |
+-------------------------+
1 row in set (0.02 sec)
mysql>
HTH
Keith Roberts
In theory, theory and practice are the same;
in practice they are not.
On Fri, 23 Jun 2006, Tom Ray [Lists] wrote:
> To: mysql@stripped
> From: "Tom Ray [Lists]" <lists@stripped>
> Subject: Autoindexing
>
> Hey, I have a really simple question (I hope)..I have a database that has
> a field in it that autoindexes the number. I screwed up and imported a
> bunch of wrong data. Up to row 200 it's right, beyond that it was wrong so
> I had delete it all. The problem now is the autoindexing is set to 1105, I
> want to change it so the next insert gets a number of 201 not 1105.
>
> I've tried to change it via phpMyAdmin but it keeps going back to 1105. Is
> there anyway I can do this?
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=1
>
>