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;Free. Runs in your browser, no install.
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;Lock it in with a real drill
You remember an answer longer once you have used it. Try a hands-on problem on this concept.