15+ PL/SQL Scenario Based Interview Questions for Experienced - 2

Question: 6

Which column in the USER_TRIGGERS data dictionary view shows that the trigger is a PL/SQL trigger?

The ACTION_TYPE column of the USER_TRIGGERS data dictionary view shows that the trigger is a PL/SQL trigger.

Question: 7

Can a view be mutating? If yes, then how?

No, a view cannot be mutating like a table. If an UPDATE statement fires an INSTEAD OF trigger on a view, the view is not considered to be mutating. If the UPDATE statement had been executed on a table, the table would have been considered as mutating.

Question: 8

How can the performance of a trigger be improved?

The performance of a trigger can be improved by using column names along with the UPDATE clause in the trigger. This will make the trigger fire when that particular column is updated and therefore, prevents unnecessary action of trigger when other columns are being updated.

Question: 9

Can triggers be disabled without removing them from database?

Yes, triggers can be disabled without removing them from database using the following command: ALTER TRIGGER TRIG_SAMPLE DISABLE

Question: 10

Can INSTEAD of triggers be used to fire once for each statement on a view?

No, INSTEAD of triggers cannot be used for each statement, however, it can only be used for each row on a view.

Related Questions