读书人

oracle SQL高级编程第1章-札记1

发布时间: 2013-07-08 14:13:00 作者: rapoo

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);

?

读书人网 >编程

热点推荐