robert_gsfame Posted May 25, 2010 Share Posted May 25, 2010 I use truncate in emptying my table...n i found that ID which is an autoincrement start again from 1..I just want to ask whether it is possible to empty the table but when i INSERT some records, ID continue from what i had before..so if i truncate the table which has 1000 records (ID from 1 - 1000), i will have ID no 1001 when inserting new record Thx Link to comment https://forums.phpfreaks.com/topic/202841-truncate-simple-question/ Share on other sites More sharing options...
premiso Posted May 25, 2010 Share Posted May 25, 2010 Yea, use the delete statement: DELETE FROM table_name WHERE 1=1 Should erase all data, but allow the autoincrementing id to persist. Link to comment https://forums.phpfreaks.com/topic/202841-truncate-simple-question/#findComment-1063122 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.