1 Answers
Types of Triggers in PL/SQL
- BEFORE Triggers: These triggers are fired before an event such as INSERT, UPDATE, or DELETE occurs on a table. They can be used to enforce business rules or perform validations before the actual operation takes place.
- AFTER Triggers: These triggers are fired after an event has occurred, such as INSERT, UPDATE, or DELETE. They are commonly used to log information, audit changes, or perform cleanup operations.
- INSTEAD OF Triggers: These triggers are used to replace the triggering action, such as an INSERT or UPDATE, with a different action. They are often used on views to enable DML operations on them, which are otherwise not directly updatable.
Each type of trigger serves a specific purpose and can be useful in different scenarios when developing database applications in PL/SQL.
Please login or Register to submit your answer