Oracle triggers: which timing/event trigger types are supported for table/view operations?

Difficulty: Easy

Correct Answer: All of the above

Explanation:


Introduction / Context:
Oracle Database supports multiple trigger types to respond to DML events. Understanding timing points and applicability to tables versus views is important for design.



Given Data / Assumptions:

  • We are considering DML triggers (INSERT/UPDATE/DELETE).
  • We need to know which trigger kinds Oracle supports.


Concept / Approach:
Oracle supports BEFORE and AFTER triggers on tables. For views (which are not inherently updatable), Oracle supports INSTEAD OF triggers to define how DML on the view maps to base tables. Therefore, all three listed types exist.



Step-by-Step Solution:

List timing points: BEFORE and AFTER for tables.Add INSTEAD OF for views to handle DML redirection.Conclude “All of the above.”


Verification / Alternative check:
Oracle documentation shows CREATE [OR REPLACE] TRIGGER ... BEFORE|AFTER ... ON table and INSTEAD OF ... ON view.



Why Other Options Are Wrong:
Any single timing option is incomplete; Oracle supports the full set for their respective targets.



Common Pitfalls:
Attempting a BEFORE/AFTER trigger on a view; for views you use INSTEAD OF triggers.



Final Answer:
All of the above

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion