SQL Interview Question

What is the difference between DELETE, TRUNCATE, and DROP?

Updated 2026-07-10 · Beginner friendly
Quick answer

DELETE removes selected rows and can use a WHERE clause, and it can be rolled back. TRUNCATE removes all rows quickly, cannot use WHERE, and resets the table, and it is harder or impossible to roll back in many databases. DROP removes the entire table including its structure, so the table no longer exists.

Quick comparison

DELETE FROM users WHERE active = 0;  -- remove some rows
TRUNCATE TABLE logs;                 -- empty the table fast
DROP TABLE temp_data;                -- remove the table entirely

DELETE is a DML command that works row by row, while TRUNCATE and DROP are DDL commands that act on the whole table structure.

In the interview

Group them clearly: DELETE for selective and reversible removal, TRUNCATE for a fast full wipe, DROP to remove the table itself. Noting that DELETE is DML while TRUNCATE and DROP are DDL earns bonus credit.

Want the full SQL guide?

Read every SQL concept with notes, diagrams, and code in one place. Track your progress as you go.

Open the SQL guide All SQL questions