MERGE INTO F_SHIPPINGORDER_GETBILL T1 USING(SELECT :SHIPPINGORDERKEY as SHIPPINGORDERKEY, :BATCHNO as BATCHNO,:SLID as SLID,:SLUSER as SLUSER,:SLDATE as SLDATE FROM dual) T2 ON(T1.SHIPPINGORDERKEY = T2.SHIPPINGORDERKEY) WHEN MATCHED THEN UPDATE SET T1.BATCHNO = T2.BATCHNO,T1.SLID = T2.SLID,T1.SLUSER = T2.SLUSER,T1.SLDATE = T2.SLDATE WHEN NOT MATCHED THEN INSERT(T1.SHIPPINGORDERKEY,T1.BATCHNO,T1.SLID,T1.SLUSER,T1.SLDATE) VALUES(T2.SHIPPINGORDERKEY
Oracle数据库匹配条件更新和新增
最新推荐文章于 2023-04-23 14:51:08 发布