Jump to content
xisto Community
Sign in to follow this  
beeseven

How Do I Reset An Auto_increment Field In Mysql?

Recommended Posts

I'm making a user system and I had to delete some because the registration was messed up. Now if I try to make another user it'll be at 4 or 5 even though there aren't any more users still in the database. How do I make it so that the next user will be 1?

Share this post


Link to post
Share on other sites

hey. i see your point, but is it really necessary to reset it? just wanna ask that question first ... if it's important number, maybe you should think about having another field to keep the "number" and keep the autoincrement for uniqueness.anyways to answer your question - i've delt with this before - only thing i could think of quickly was to drop the table and recreate it. that'll definately reset it :angry:)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.