MERGE INTO

MERGE INTO t_um_dic_type t 
   USING (SELECT :dicTypeCode as code, :dicTypeName as name FROM dual) t1 
   ON (t.code = t1.code and t.name = t1.name) 
  WHEN MATCHED THEN 
   UPDATE SET t.type = :type, t.\"DESC\" = :dicTypeDesc 
   WHEN NOT MATCHED THEN 
   INSERT (id,code,name,type,\"DESC\",dt_create) 
   VALUES (:dicTypeId,:dicTypeCode,:dicTypeName,:type,:dicTypeDesc,:dtCreate)

posted on 2016-06-13 15:45  一値很安靜;︶  阅读(123)  评论(0编辑  收藏  举报

导航