Multiple choice technology databases

What is true about triggers I. instead of trigger can be used on tables and views 2. instead of trigger can fire at eah row and statement levels. 3. Compund trigger in 10g allows us to specify multiple timig events on single database objects. 4. we should not use the same object which fired the trigger inside the trigger. this will result in mutating trigger error.

  1. 2 and 4 are true

  2. 1 , 3 and 4 are true

  3. 1 and 3 are true

  4. Only 4 is true

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

Statement 4 is correct because accessing the same table that fired the trigger within the trigger causes a mutating table error in Oracle. This is a well-known restriction. Statements 1 and 3 are incorrect: INSTEAD OF triggers can only be used on views (not tables), and compound triggers don't allow multiple timing events on the same object in the manner described. Statement 2 is incorrect as INSTEAD OF triggers only fire at the statement level, not row level.

AI explanation

INSTEAD OF triggers can only be defined on views, not tables, so statement 1 is false. INSTEAD OF triggers always fire at the row level (once per affected row), not at the statement level, so statement 2 is false. Compound triggers that let you specify multiple timing points on a single trigger object were introduced in Oracle 11g, not 10g, so statement 3 is false. Statement 4 is true: referencing (querying or modifying) the same table that fired a row-level trigger from within that trigger causes the classic "mutating table" error, since the table's state is inconsistent mid-transaction.