The difference between the DELETE and TRUNCATE SQL clauses is
-
The TRUNCATE clause deletes all rows in a database table, while the DELETE clause can have a WHERE condition and might or might not delete all rows in a table
-
The TRUNCATE clause is identical to the DELETE clause
-
The DELETE clause deletes all rows in a database table, while the TRUNCATE clause can have a WHERE condition and might or might not delete all rows in a table
-
None of these
TRUNCATE removes all rows from a table without a WHERE clause and cannot be conditional, while DELETE can use WHERE to selectively remove rows. TRUNCATE is faster and resets identity values, whereas DELETE logs individual row deletions.
TRUNCATE is a DDL operation that removes all rows from a table unconditionally (and resets storage), while DELETE is a DML operation that can include a WHERE clause, letting you remove a subset of rows or, if no condition is given, all of them. This distinction — TRUNCATE always clears everything, DELETE is conditional — is the key practical difference between the two.