On which of the following, the events in a trigger can be fired ?
(i) Select
(ii) Update
(iii) Delete
(iv) Insert
MH SET - 2021, SET Exam - 2021,
Answer: C
Trigger events are (ii), (iii) and (iv), so the answer is (ii), (iii) and (iv).
A DML trigger is fired by a statement that changes data in its table: an INSERT, an UPDATE or a DELETE. It can run before or after the change, once per statement or once per affected row, for example to keep an audit log or enforce a rule the constraints cannot express.
A SELECT reads data without changing it, so in standard SQL and in the major database systems it does not fire a trigger. Options that include (i) are therefore wrong, and the option naming only update and delete leaves out insert.
Please log in or register to report this question.