Idea Summary
Right now QuickSQL generates non-compound triggers with names like “employees_biu” (employees before insert update) leading folks down the path of creating another trigger like “employees_aiu” (employees after insert update). Generally a table should really only have a single trigger (yes, if you are using Edition Based Redefinition you'd have two triggers). Since compound triggers were introduced in Oracle 11g, that single trigger should be a compound trigger.
Use Case
Compound triggers have many advantages over multiple triggers including global declarations and a specific firing order, but by far the biggest advantage is a single place to look for trigger logic.
When a trigger in QuickSQL is generated, it should look something like the below:
create or replace trigger <trigger-name> --example: employee_compound_trigger
for insert or update or delete on <table-name>
compound trigger
-- global declarations
-- 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.
end before each row;
after each row is
begin
null; -- do something here.
end after each row;
after statement is
begin
null; -- do something here.
end after statement;
end <trigger-name>;
/