Index

How to create Trigger in DB2

Follow the below steps to create the trigger for the tables
1.Create the Sequence

Syntax
Create Sequence G02491P.TRIGGER_SEQ1 as INTEGER 
 Start With 1 
 Increment by 1 
 MinValue 1 
 MaxValue 2147483647  
 Cache 24

2.Create the function

[code]
Syntax
Create Function G02491P.get_next ()
Returns INTEGER
Specific get_next
Language SQL
Deterministic
External Action
Reads SQL Data