Updatable Views and INSTEAD OF Triggers
Explore the mechanics of making complex database views modifiable using INSTEAD OF triggers and understanding the limitations of auto-updatable views in SQL.
Sample Questions
What is an updatable view in a database?
- A view that automatically updates its definition when the schema changes
- A view that allows DML operations like INSERT, UPDATE, and DELETE to modify underlying base tables
- A view that can only be refreshed manually by the DBA
- A view that stores data physically on the disk like a table
Which SQL clause in a view definition usually prevents it from being inherently updatable?
- WHERE
- ORDER BY
- GROUP BY
- AS
What is the primary purpose of an INSTEAD OF trigger?
- To provide a backup of the data before a change
- To perform an action after the base table has been updated
- To override the standard action of a DML statement on a view or table
- To log the user who performed the DML operation