Staging trigger example

There are three triggers on each staging table to log the INSERT, UPDATE, and DELETE actions that happens on it. The log is written in the STAGLOG table by the triggers.


INSERT trigger example

This trigger logs INSERT actions in the STAGLOG table after an INSERT action happens on the CATGROUP table. (DB2)

(Oracle)


UPDATE trigger example

This trigger logs UPDATE actions in the STAGLOG table after an UPDATE action happens on the CATGROUP table. (DB2)

(Oracle)


DELETE trigger example

This trigger logs DELETE actions in the STAGLOG table after a DELETE action happens on the CATGROUP table. (DB2)

(Oracle)


Related tasks
Creating triggers for custom tables