Triggers is such an important concept. It comes under server programming bucket.
– Three important functions Triggers will do are I-U-D (Insert, Update, Delete).
A mastering guide is IBM Redbook:
– Trigger will be created by CREATE TRIGGER
– Before SQL operation starts a Trigger will execute first
– A trigger referential constraints and check constraints the data before it is actually updating into tables. It maintains data integrity
– It will also work on Non data base operations defined in UDF(user developed functions)
Who creates Triggers:
These are critical to business. A small mistake takes to cost more. So an Admin will create Triggers.
“DB2 Control center” is user-friendly, we can create Triggers by using it. Apart from this we can also create triggers in ZOs, as we create Tables.
Create Trigger Trigger_Name
actual sql stamens to be executed will come here.
Check here creation of Trigger with DB2 control center.