MERGE INTO USER_TEST T1 USING (SELECT '1001' AS ID,'王睿' AS NAME FROM dual) T2 ON ( T1.ID=T2.ID) WHEN MATCHED THEN UPDATE SET T1.NAME = T2.NAME WHEN NOT MATCHED THEN INSERT (NAME) VALUES(T2.NAME); commit;