db2 CREATE trigger
 
--监控某个表,当数据插入到表后,执行触发。
  www.2cto.com  
CREATE trigger tri_ins_UB_ORGINFO
    after INSERT ON UB_ORGINFO
           --for insert
     REFERENCING NEW AS n
     FOR EACH ROW  --MODE SQL
      BEGIN ATOMIC
 
 delete from   UB_ORGINFO_HK;
 insert into UB_ORGINFO_HK (
 SELECT I_ID as ibankid, S_DISPLAYNAME as SBANKNAME,PBCBIGAREABANK  as sbanktype
  FROM UB_ORGINFO
  WHERE    -- BUSINESSCATEGORY !='1'    AND 
  I_STATUS=1
    AND S_DN IS NULL  AND PBCBIGAREABANK=276
     AND PBCBIGAREABANK IS not  NULL) ;
   
   end