Three commands remove data, but at very different scales: DELETE removes rows, TRUNCATE empties a table, DROP destroys the table itself. Confusing them is dangerous — and clarifying them is a classic interview question.
Key Points
- DELETE: row-by-row removal, supports WHERE, can be rolled back in a transaction
- TRUNCATE: instantly empties the whole table, resets AUTO_INCREMENT, cannot target rows
- DROP: deletes the table structure, data, and indexes entirely
- Speed: TRUNCATE > DELETE for full-table clears
- DELETE fires triggers; TRUNCATE does not
- DROP and TRUNCATE are DDL and auto-commit — no rollback
.png)