5-12. Creating a Trigger That Fires on Multiple Events
You have logic that is very similar for two different events. Thus, you want to combine that logic into a single trigger that fires for both. For example, let's assume that we want to create a single trigger on the
EMPLOYEES table with code to fire after each row that is inserted or modified and also with code to fire at the end of each of those statements' executions.xs
Use a compound trigger to combine all the triggers into a single body of code. The trigger in this solution will execute based upon various timing points. It will execute
AFTER EACH ROW in the
EMPLOYEES table has been updated, as well as
AFTER the entire update statement has been executed. The
AFTER EACH ...