Question 1
The ORDERS table has an `AFTER DELETE ... FOR EACH ROW` trigger that inserts one row into ORDER_AUDIT for every order removed. A maintenance job empties the table with `TRUNCATE TABLE orders;` while ORDERS holds 400 rows. How many rows does the trigger write to ORDER_AUDIT?
A. Zero — TRUNCATE is DDL and does not fire DML (DELETE) triggers.Correct answer
TRUNCATE removes rows as a DDL operation, not row-by-row DML, so no DELETE trigger — row-level or statement-level — fires. The reference notes TRUNCATE does not fire the table's DELETE triggers, so ORDER_AUDIT gains no rows.
B. 400 — TRUNCATE fires the AFTER DELETE row trigger once for every row it removes.
This is the 'TRUNCATE fires DELETE triggers' misconception. Because TRUNCATE does not remove rows via DML, it fires no DELETE triggers at all; only an actual DELETE statement would trigger the per-row audit.
C. 1 — TRUNCATE fires the trigger once at the statement level rather than per row.
This is a variant of the same misconception (that TRUNCATE fires DELETE triggers, just once). TRUNCATE fires no DML triggers whatsoever, so it produces neither per-row nor statement-level audit rows.
D. It raises an error because the presence of an AFTER DELETE trigger blocks TRUNCATE.
This assumes a DELETE trigger prevents TRUNCATE. The reference imposes no such restriction; a DELETE trigger is simply bypassed, not an obstacle, so the TRUNCATE succeeds and writes zero audit rows.
Explanation
TRUNCATE clears a table as a DDL operation and never processes rows through the DML path, so DELETE triggers — whether row-level or statement-level — do not fire. A DELETE statement, by contrast, removes rows as DML and fires those triggers for each affected row. Any audit or cascade logic built on DELETE triggers is therefore silently skipped when a table is truncated.