oracle SQL高级编程第1章----笔记1
merge into dept60_bonuses busing (select employee_id, salary, department_idfrom hr.employeeswhere department_id = 60) eon (b.employee_id = e.employee_id)when matched thenupdate set b.bonus_amt = e.salary * 0.2where b.bonus_amt = 0delete where (e.salary > 7500)when not matched theninsert (b.employee_id, b.bonus_amt)values (e.employee_id, e.salary * 0.1)where (e.salary < 7500);
?