Use merge into to solve the effect of inserting responsible ignore

quote


merge into zx_test T 
   using (select 8 ID, 'abcd' FNAME,10 AGE from sysibm.sysdummy1) A 
  on T.ID = A.ID 
  when not matched then  
    insert (ID,FNAME,AGE)  
    values(8, 'abcd',10)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326117883&siteId=291194637