delete all table data in mysql code example
Example 1: how to delete a table entry in mysql
DELETE FROM `table_name` [WHERE condition];
Example 2: mysql empty a table
TRUNCATE TABLE tblYourTable;
SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE YourTable1;
TRUNCATE YourTable2;
SET FOREIGN_KEY_CHECKS = 1;
DELETE FROM tblYourTable WHERE condition;
DELETE FROM tblYourTable LIMIT row_count;
Example 3: delete all records from table
DELETE FROM table_name;
Example 4: remove all records from table mysql
DELETE from tableName;
TRUNCATE tableName;
Example 5: delete all content in table mysql
TRUNCATE tablename