Search code examples
mysqlsqldatabasephpmyadminbigtable

Delete all fields in huge mysql table


I have a lot amount of db, now i need to delete some table, where is many data, about millions, but if i delete using sql syntaxis, phpmyadmin interface, or delete table, i still have some data after refreshing. How to delete clear all data in table?


Solution

  • The easiest way to ensure you get a table wiped is to use the TRUNCATE TABLE table_name statement. If you still have data in the table after that, it means something is constantly adding data to the table.