Re: reset auto_increment

2003-12-22 Thread Trevor Rhodes
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

Re: reset auto_increment

2003-01-11 Thread Paul DuBois
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

RE: Reset auto_increment

2002-02-13 Thread Rick Emery
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. -

RE: Reset auto_increment

2002-02-07 Thread Paul DuBois
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

RE: Reset auto_increment

2002-02-07 Thread Rick Emery
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. -

RE: reset auto_increment?

2001-09-17 Thread Paul DuBois
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, >

RE: reset auto_increment?

2001-09-17 Thread Jay Fesco
> 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