Multiple choice technology databases

Which command will delete all data from a table and will not write to the rollback segment?

  1. DROP

  2. DELETE

  3. CASCADE

  4. TRUNCATE

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

TRUNCATE is a DDL command that quickly removes all rows from a table by deallocating data pages, without logging individual row deletions to the rollback segment. DROP removes the entire table structure. DELETE logs each row deletion to rollback.

AI explanation

TRUNCATE is a DDL (Data Definition Language) command that removes all rows from a table by deallocating the data pages/extents directly, rather than logging each row deletion individually — so it does not use the rollback segment/undo log the way DML does, and generally cannot be rolled back. DELETE is a DML command that logs each row removal to the rollback segment (so it can be rolled back). DROP removes the entire table structure, not just its data. CASCADE isn't itself a data-removal command — it's a modifier used with DROP/DELETE to also remove dependent objects/rows.