DELETE
Removes selected rows.
DELETE FROM employees WHERE department = 'HR';
TRUNCATE
Removes all rows from a table, usually with less row-by-row work than DELETE.
TRUNCATE TABLE employees;
DROP
Removes the table itself.
DROP TABLE employees;
SQL · Keys, Schema & CTEs
DELETE vs TRUNCATE vs DROP?
Removes selected rows.
DELETE FROM employees WHERE department = 'HR';
Removes all rows from a table, usually with less row-by-row work than DELETE.
TRUNCATE TABLE employees;
Removes the table itself.
DROP TABLE employees;
🎯 Put this concept into practice
Solidify this answer with real hands-on interview drills in the browser studio.