Oracle triggers when updating
In previous releases this type of functionality was only possible by defining multiple triggers whose code and global variables were defined in a separate package, as shown in the Mutating Table Exceptions article, but the compound trigger allows for a much tidier solution.
Well, I dare you to walk into a room full of Oracle experts wearing an I ♥ DATABASE TRIGGERS t-shirt. Database triggers are the Oracle feature that developers love to hate, perhaps above every other.A trigger is a pl/sql block structure which is fired when a DML statements like Insert, Delete, Update is executed on a database table.A trigger is triggered automatically when an associated DML statement is executed.The main body of the trigger is made up of an optional global declaration section and one or more timing point sections, each of which may contain a local declaration section whose state is not maintained. g_global_variable VARCHAR2(10); BEFORE STATEMENT IS BEGIN NULL; -- Do something here.END BEFORE STATEMENT; BEFORE EACH ROW IS BEGIN NULL; -- Do something here.