> Dear Peter,
>
> > Even if i delete the record where id=65535
> > DELETE FROM cust WHERE id=65535
> > AUTO_INCREMENT starts with 65535 and i cant add any more records.
>
> Sad, but true, MySQL "remembers" the biggest number inserted into an
> auto_increment column. If you delete the row in question, the next
> insert will add the biggest number again.
>
> The only workaround I can see is to copy the table (without the problem
> id row) to another table with the same structure. Maybe someone has a
> better solution?!
how about "upgrading" the smallint id column to a larger integer size?
mysql> ALTER TABLE cust CHANGE id INT UNSIGNED
-> NOT NULL AUTO_INCREMENT;
/ Carsten
--
Carsten H. Pedersen
keeper and maintainer of the bitbybit.dk MySQL FAQ
http://www.bitbybit.dk/mysqlfaq
---------------------------------------------------------------------
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