me looking so small in this world

20 2007f May, 2007

resetting the auto_increment field in mysql

Filed under: mysql, php — rudyegenias @ 1:38 pm

Oftentimes one needs to test web application to see if it works. But during those times one doesn’t have to retain all of the test data and after you delete the test data the auto_increment field(mostly id’s) don’t reset itself.

Here is a way to reset the auto_increment column in your mysql database:

alter table account auto_increment=4;

Guessing that I have 3 accounts I wanted to retain.

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.