Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. Interview prep
  3. DELETE vs TRUNCATE vs DROP?

SQL · Keys, Schema & CTEs

DELETE vs TRUNCATE vs DROP?

Easysql-39
deletetruncatedropddl

Question

DELETE vs TRUNCATE vs DROP?

Solution

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;

🎯 Put this concept into practice

Solidify this answer with real hands-on interview drills in the browser studio.

Open related drill →
PreviousNext