1-- If you do not need a condition or limit the rows:
2TRUNCATE TABLE tblYourTable; -- Not Foreign key constrained
3
4-- Or
5
6SET FOREIGN_KEY_CHECKS = 0;
7
8TRUNCATE YourTable1;
9TRUNCATE YourTable2;
10
11SET FOREIGN_KEY_CHECKS = 1;
12
13-- --------------------------------------------------------
14-- Otherwise:
15DELETE FROM tblYourTable WHERE condition;
16
17-- Or
18
19DELETE FROM tblYourTable LIMIT row_count;
1/* Will delete all rows from your table. Next insert will take next auto increment id. */
2DELETE from tableName;
3/* Will delete all rows from your table but it will start from new row with 1. */
4TRUNCATE tableName;