Jump to content

Resetting Counter


lilman

Recommended Posts

I have an auto increment id set up for my table users.  I want to reset it so it starts counting at 0. See, I register accounts and then dropped them but the auto increment doesn't start over. I hope I was clear enough, if not let me know.

Is there a way to restart the counter?
Link to comment
Share on other sites

Wow - that is exactly the same exact question I have.

Call me annal retentive, but when I originally built the table I had a way to do it that set it to 1001 as the starting point. Because it is our member list I would like to have the new data load starting with 1001.

It is an AR thing I know because from the functioning of the database it makes absolutely no difference. But it is something I want to do, so what would be the SQL statement to do it?

I tried
[quote]ALTER TABLE directory MODIFY user_id AUTO_INCREMENT = '1001'[/quote]


But that bombs - I am trying to modify it in PHPAdmin.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.