Multiple choice technology databases

The difference between the DELETE and TRUNCATE SQL clauses is:

  1. 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.

  2. The TRUNCATE clause is identical to the DELETE clause

  3. 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.

  4. None fo the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

TRUNCATE is a DDL operation that quickly removes all rows from a table and cannot use a WHERE clause. In contrast, DELETE is a DML operation that can target specific rows using a WHERE condition. The other options incorrectly swap these behaviors or claim the commands are identical.