把employees2表的值更新employees表的值
update (select e1.salary,e2.salary new_salfrom employees e1,employees2 e2
where e1.employee_id=e2.employee_id and e1.department_id=90)
set salary=new_sal;
更新多列 根据其他数据表更新数据
把employees2表薪水与employees表不等切部门90的数据更新到employees表奖金乘以10%
update employees
set (salary,commission_pct)=(select employees2.salary,.10 comm_pct
from employees2
where employees2.employee_id=employees.employee_id
and employees.salary !=employees2.salary)
where department_id=90