FOR EACH ROW / FOR EACH STATEMENT TRIGGER Conditions
search cancel

FOR EACH ROW / FOR EACH STATEMENT TRIGGER Conditions

book

Article ID: 12558

calendar_today

Updated On:

Products

Repository

Issue/Introduction



Where in the Repository are the Trigger conditions FOR EACH ROW / FOR EACH STATEMENT STORED?  We use the Repository to generate DB2 DDL and we need to change the condition in the repository so that the corresponding DDL contains the correct condition. 

Environment

Release: DATASH00200-7.2-Repository-Webstation Option
Component:

Resolution

The trigger condition is stored on the TRIGGER entity type in the DB2 dialog. The DB2 DDL generation program checks the TRIGGERING TYPE column for the presence of the ROW keyword.  

If found, then FOR EACH ROW is generated.  If ROW is omitted then FOR EACH STATEMENT is generated. 

For example

TRIGGER TYPE           ===> AFTER ROW

Results in 'FOR EACH ROW' being generated.