List:General Discussion« Previous MessageNext Message »
From:Daevid Vincent Date:April 29 2003 4:19am
Subject:RE: Resetting Autoincrement.
View as plain text  
I'm like you, and like to have the numbers sequential, especially for small
recordsets like that.

What I suggest as quick hack, is to export the data & schema. Drop the
table. Then create the schema and input the data again. phpMyAdmin is a
great tool for doing just that.

> -----Original Message-----
> From: Gabriel-Dumitrel MOSCALU [mailto:gabriel.moscalu@stripped] 
> Sent: Monday, April 28, 2003 10:09 PM
> To: Prabu Subroto; mysql@stripped; Paul DuBois
> Subject: Re: Resetting Autoincrement.
> 
> 
> Hi there,
> 
> Based on this subject, i would have another question.
> 
> What if I delete all records, would it be possible to reset the
> auto_increment? (as a reson of why, I just like having the things done
> properly).
> 
> Thanks,
> Gabriel
> 
> ----- Original Message -----
> From: "Paul DuBois" <paul@stripped>
> To: "Prabu Subroto" <prabusubroto@stripped>; <mysql@stripped>
> Sent: Monday, April 28, 2003 7:09 PM
> Subject: Re: Resetting Autoincrement.
> 
> 
> > At 5:54 -0700 4/28/03, Prabu Subroto wrote:
> > >Dear my friends....
> > >
> > >I have a column with auto_increment, namely "SalesID".
> > >I want to know how to reset the auto_increment.
> > >For example:
> > >I have 20 persons who work as our sales. So it means
> > >the last SalesID is 20.
> > >If I delete the last row of SalesID (20) and insert a
> > >new one than it will start not from 20 but from 21.
> > >Where as I want it starts back from 20.
> > >
> > >The second question is: "Is it possible to make the
> > >MySQL (3.23.55) reset the auto_increment
> > >automatically?
> >
> > Automatically?  No.  Why do you want to, anyway?  (Why bother?)
> >
> > --
> > Paul DuBois
> > http://www.kitebird.com/
> > sql, query
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:
> http://lists.mysql.com/mysql?unsub=1
> >
> >
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    
> http://lists.mysql.com/mysql?> unsub=daevid@stripped
> 

Thread
Resetting Autoincrement.Prabu Subroto28 Apr
  • Re: Resetting Autoincrement.Paul DuBois28 Apr
  • Re: Resetting Autoincrement.Gabriel-Dumitrel MOSCALU29 Apr
    • RE: Resetting Autoincrement.Daevid Vincent29 Apr
      • Re: Resetting Autoincrement.Joel Rees30 Apr
    • Re: Resetting Autoincrement.Prabu Subroto29 Apr
Re: Resetting Autoincrement.Prabu Subroto28 Apr
  • re: Re: Resetting Autoincrement.Victoria Reznichenko29 Apr
    • re: Re: Resetting Autoincrement.Prabu Subroto5 May