shetie dog writes:
> Hi. > This may be a obvious problem but... > I want to re sequence a auto increment column called p_key starting with 1001. Hmm... sounds like bad database design to me, but OK. > I found some information on this the Paul DuBois book MySql: > I tried dropping the column and adding it again per there instructions: > > ALTER TABLE t DROP i; > ALTER TABLE t ADD i INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY; > > But It did not help as it does not start at 0 value but at the last value > such as 1076 Does the _next_ row that you insert into table get that value? If so, are there by any chance 1075 rows in the table? If you create an auto_increment column the existing rows will auto- matically be numbered from 1 and up. If in fact you drop the column and the values when you recreate it start at a value other than 1, and you didn't specify the start value, you've found some sort of bug. :-o //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php