Aureole Posted July 27, 2007 Share Posted July 27, 2007 I have a table in MYSQL which has a row which is set to auto increment. Because I've been testing my system out so much the id is at around 100 or something. I tried deleting everything from the table but then when I make a new news story the id carries on from where it left off, how can I make it start again from 1? Quote Link to comment Share on other sites More sharing options...
per1os Posted July 27, 2007 Share Posted July 27, 2007 You can reset an auto_increment field in mySQL by using the following syntax: alter table <tablename> auto_increment = #; Where # is an integer value. http://www.developer.be/index.cfm/fuseaction/faqDetail/FaqId/187.htm Quote Link to comment Share on other sites More sharing options...
Aureole Posted July 27, 2007 Author Share Posted July 27, 2007 Thanks a lot. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.