Topics

DELETE (DML) removes rows conditionally, rollback possible; whereas TRUNCATE (DDL) removes all rows, often non-reversible.

DELETE FROM employees WHERE department = 'HR';
TRUNCATE TABLE employees;

DELETE targets specific rows; TRUNCATE clears entire table.

For large tables, TRUNCATE is faster than DELETE as it doesn’t log individual row deletions.