I often have to create trigger which will copy all contents of the rows on insert/update to another table. As some tables have 200 columns this often is a long writing of
CREATE TRIGGER scheme.trigger AFTER UPDATE ON scheme.table
REFERENCING OLD as o_row NEW as n_row
FOR EACH ROW
BEGIN
INSERT INTO archive (...) VALUES(...);
END;
This is a lot of typing. Is there an easy generator to build these type of triggers, inserts, updates?
If the process has a set of input parameters and the process with these parameters is the same, you can call a stored procedure from the trigger, passing the parameters.
In this way, you do not have to recopy/recreate all these DML sentences.