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? Link to comment https://forums.phpfreaks.com/topic/62093-solved-resetting-auto-increment/ 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 Link to comment https://forums.phpfreaks.com/topic/62093-solved-resetting-auto-increment/#findComment-309142 Share on other sites More sharing options...
Aureole Posted July 27, 2007 Author Share Posted July 27, 2007 Thanks a lot. Link to comment https://forums.phpfreaks.com/topic/62093-solved-resetting-auto-increment/#findComment-309145 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.