bradkenyon Posted March 8, 2007 Share Posted March 8, 2007 what would the query be to clear all data from a specified table, but keep the table intact, to add more data to it? Thanks, Brad Link to comment https://forums.phpfreaks.com/topic/41785-clear-data-from-specified-table/ Share on other sites More sharing options...
Glyde Posted March 8, 2007 Share Posted March 8, 2007 TRUNCATE TABLE table_name That will basically restore the table to its original state when the CREATE TABLE command was run. All auto_increment field counts will be restarted from 1; all data entries cleared; but the table will have the same structure. Link to comment https://forums.phpfreaks.com/topic/41785-clear-data-from-specified-table/#findComment-202637 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.