thefollower Posted September 12, 2008 Share Posted September 12, 2008 I just cleaned out my database so its pure empty but the primary key still begins one up from the record that was once there which is no longer... how do you set the primary key back to 1 so it goes up as 1 2 3 etc again ? I remember doing it before like 3 years ago with php but totally forgotten the syntax to do it :S Hope you can help! Link to comment https://forums.phpfreaks.com/topic/123976-solved-reset-primary-key/ Share on other sites More sharing options...
Mchl Posted September 12, 2008 Share Posted September 12, 2008 ALTER TABLE table AUTO_INCREMENT = 0; Link to comment https://forums.phpfreaks.com/topic/123976-solved-reset-primary-key/#findComment-640001 Share on other sites More sharing options...
thefollower Posted September 12, 2008 Author Share Posted September 12, 2008 Thanks Link to comment https://forums.phpfreaks.com/topic/123976-solved-reset-primary-key/#findComment-640002 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.