freakus_maximus Posted September 8, 2006 Share Posted September 8, 2006 Is there a way to reset the autoindex?Just curious, since with all my testing I go back and just wipe out the data in the tables and start clean but the next autoindex will not start at 1.I tried removing the autoincrement after deleting the data, then make the id field autoincrement again, but that did not change anything, it still held the old next autoindex value. Quote Link to comment Share on other sites More sharing options...
effigy Posted September 8, 2006 Share Posted September 8, 2006 I use[tt] TRUNCATE table_name [/tt] in MySQL 5+. I think in the older versions it's[tt] DELETE FROM table_name [/tt] as opposed to[tt] DELETE * FROM table_name[/tt]. Quote Link to comment Share on other sites More sharing options...
fenway Posted September 8, 2006 Share Posted September 8, 2006 DELETE will remove all records without re-setting the counter... TRUNCATE should work in all versions. 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.