Mike,
set insert_id=1;
> can the auto_increment value be reset back to '1' withou recreate the
> entire table again ?? The table would be emptied first, but we would like
> to reset the auto_increment value back to '1' without having to drop and
> recreate the table, if possible.
Regards
At 16:06 -0500 1/10/03, "INVALID - TESTING ONLY. IF YOU GET EMAIL
WITH THIS ACCOUNT P wrote:
I need to reset the auto_increment in a table full of data. I had a problem
recently where some script was putting InvoiceID numbers into an
auto_increment CustID column...I since fixed the problem and c
The following deletes all records and re-starts renumbering from 1;
DELETE FROM mytable;
The following deletes all records and continues counting from where the
table last left off:
DELETE FROM mytable WHERE 1;
If you are trying to restart numbering while not deleting records,
forget-about-it.
-
At 14:57 -0600 2/7/02, Rick Emery wrote:
>The following deletes all records and re-starts renumbering from 1;
>DELETE FROM mytable;
>
>The following deletes all records and continues counting from where the
>table last left off:
>DELETE FROM mytable WHERE 1;
>
>If you are trying to restart numberi
The following deletes all records and re-starts renumbering from 1;
DELETE FROM mytable;
The following deletes all records and continues counting from where the
table last left off:
DELETE FROM mytable WHERE 1;
If you are trying to restart numbering while not deleting records,
forget-about-it.
-
At 3:15 PM -0400 9/17/01, Jay Fesco wrote:
> > Can someone tell me how to reset a column's auto_increment starting point
>> back to 0 in mysql ?
>>
>> Thanks
>>
>> Paul
>>
>According to Paul DuBois on page 169 of MySQL by New Riders (which you
>should buy):
>
>ALTER TABLE t
> DROP i,
>
> Can someone tell me how to reset a column's auto_increment starting point
> back to 0 in mysql ?
>
> Thanks
>
> Paul
>
According to Paul DuBois on page 169 of MySQL by New Riders (which you
should buy):
ALTER TABLE t
DROP i,
ADD i INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY
Ja