Oracle MERGE例子
MERGE INTO TEST T1USING (SELECT 'aa' AS f1, 'bb' AS f2 FROM DUAL) T2ON (T1.f1= T2.f1AND T1.f2= T2.f2)WHEN MATCHED THEN UPDATE SET f3 = '1', f4 = '01', f5 = '11', f6 = '111', f7 = '01', f8 = SYSTIMESTAMPWHEN NOT MATCHED THEN INSERT (f0, f3, f2, f4, f5, f1, f6, f7, f9, f8, f10) VALUES (WHITEMOBILE_SEQ.NEXTVAL, '2', 'bb', '01', '12', '106100001', '12', '01', 1, SYSTIMESTAMP, 'aa')
?