Jump to content

Archived

This topic is now archived and is closed to further replies.

Ninjakreborn

reset id's

Recommended Posts

I like resetting my database's completely before going live, but I have a question for now.  How do I figure out how to reset the id's on my auto-incremented fields.  I have 1 auto-incremented id field for almost every table, but I like resetting those id's before everything goes live so that start counting back from one, how do I do this using phpmyadmin.

Share this post


Link to post
Share on other sites
If you are using phpMyAdmin all you have to do is "Empty" each table and it will reset it.

-Chris

Share this post


Link to post
Share on other sites
emtpy?  if you mean removing everything from the table, I delete it all and it doesn't reset, is there an option called empty, where do I find this.??

Share this post


Link to post
Share on other sites
No problem it should have been a tab up at the top.

You can also go into the operations tab and there is a spot where you can change the auto inc number.

-Chris

Share this post


Link to post
Share on other sites
"TRUNCATE TABLE" is the MySQL command you seek.

Share this post


Link to post
Share on other sites

×

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.