how to reset the auto_increment value for MySQL

Have you ever had a table where you wanted to drop all the information and reset the id field? Say you have the auto_increment value at 1024 and you want to drop all the data and make all new rows start from 1. Or maybe you have the auto_increment value at 1024 and you want to jump it to have all new rows start from 10024. Here is how

1
2

ALTER TABLE {table_name} AUTO_INCREMENT = {new_value};

Thats it.

Comments

Hero

about 1 year ago

Very good site! I like it! Thanks! . [URL=http://my-test-doorway.myhost.com].[/URL]

Hero

about 1 year ago

Very good site! I like it! Thanks! . [URL=http://my-test-doorway.myhost.com].[/URL]

youtube on palm

about 1 year ago

Quotation, n: The act of repeating erroneously the words of another. [url=http://www.geocities.com/youtubehivideo/tube.html] pantech duo wont play youtube [/url][url=http://www.geocities.com/softiphonemp3/cool.html] japanese girls making out youtube [/url][url=http://www.geocities.com/youtubesiteone/britneyspearslive.html] grand theft auto 4 box art youtube [/url][url=http://www.geocities.com/youtubehivideo/youtube1.html] youtube to avi converter tool [/url][url=http://www.geocities.com/softiphonemp3/index.html] mika big girls youtube [/url] schoolgirl youtubekristin davis sex youtube

Heel

about 1 year ago

Very good site! I like it! Thanks! . [URL=http://my-test-doorway.myhost.com].[/URL]

Heel

about 1 year ago

Very good site! I like it! Thanks! . [URL=http://my-test-doorway.myhost.com].[/URL]

Name

Email

URL

Comment