Programming

What is the difference between DELETE and TRUNCATE in SQL?

Short answer

DELETE removes rows one at a time and can be filtered with a WHERE clause, while TRUNCATE instantly removes all rows in a table at once and generally can’t be filtered.

Both commands remove data from a table, but they work very differently under the hood.

DELETE

TRUNCATE

If you need to remove only some rows, DELETE is the right tool. If you need to quickly empty an entire table while keeping its structure, TRUNCATE is typically faster.

Last reviewed: September 2026