Can views be specified in a trigger statement?
-
True
-
False
INSTEAD OF triggers can be defined on views in database systems like SQL Server and Oracle. These triggers fire instead of the DML operation (INSERT, UPDATE, DELETE) that would otherwise be performed on the view. This allows you to implement custom logic for updating views that would otherwise be non-updatable because they join multiple tables or contain computed columns.
The truthful answer is 'True' — views CAN be specified in a trigger statement. Standard SQL (since SQL:1999) and every major DBMS — SQL Server, Oracle, IBM Db2, Informix, and PostgreSQL — support INSTEAD OF triggers defined directly on a view (CREATE TRIGGER ... INSTEAD OF INSERT/UPDATE/DELETE ON ). In fact, INSTEAD OF triggers are the standard mechanism for making otherwise non-updatable views (e.g. multi-table joins) writable: the trigger intercepts the DML and executes procedural logic against the base tables instead. The only restriction is that AFTER/BEFORE triggers cannot be placed on views — but the question asks whether views can appear in a trigger statement at all, and they demonstrably can. The DB's marked answer 'False' reflects an outdated/simplified 'triggers only apply to base tables' notion and is factually incorrect.