merge stmt in oracle

I'm trying to write a merge stmt for oracle.  i'm trying to merge tableA t when not matched then insert when matched then update.  what would be the syntax for oracle?  thank you.
Who is Participating?
   USING (SELECT employee_id, salary, department_id 
          FROM employees
          WHERE department_id = 80) S
          ON (A.employee_id = S.employee_id)

   WHEN MATCHED THEN UPDATE SET A.bonus = A.bonus + S.salary*.01

   WHEN NOT MATCHED THEN INSERT (A.employee_id, A.bonus)
     VALUES (S.employee_id, S.salary*0.1)
     WHERE (S.salary <= 8000)

Open in new window

This is a slightly reworked variant from a MERGE documentation page. You don't provide much detail in the question so this example realtes to "employees" information
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.