php_guest Posted May 25, 2009 Share Posted May 25, 2009 I deleted all rows inside table. The problem is if that when new data are coming into cleared table, the ID column which is set as auto_increment doesn't start from 0 but from where it stopped before I deleted all rows. How I can delete also this record to start ID again from 0? Thank you Quote Link to comment https://forums.phpfreaks.com/topic/159600-solved-how-to-start-auto_increment-id-again-from-0/ Share on other sites More sharing options...
kevinkorb Posted May 25, 2009 Share Posted May 25, 2009 TRUNCATE TABLE 'tablename' That will clear all data and reset your auto_increment value. Quote Link to comment https://forums.phpfreaks.com/topic/159600-solved-how-to-start-auto_increment-id-again-from-0/#findComment-841935 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.