2018-01-14

MERGE INTO EMPLOYE AS EM

USING MANAGER AS MA 

ON EM.EMPLOYEID=MA.EMPLOYEID 

WHEN MATCHED THEN UPDATE SET EM.SALARY=MA.SALARY 

WHEN NOT MATCHED THEN INSERT VALUES (MA.EMPLOYEID,MA.NAME,MA.SALARY)

你可能感兴趣的:(2018-01-14)