题解 | #将所有获取奖金的员工当前的薪水增加10%#
将所有获取奖金的员工当前的薪水增加10%
http://www.nowcoder.com/practice/d3b058dcc94147e09352eb76f93b3274
先join 获奖emp_no到工资表, 然后更新工资
update salaries as s join emp_bonus as e
on s.emp_no=e.emp_noset salary = salary*1.1
where to_date='9999-01-01';
update salaries
set salary=salary*1.1
where to_date='9999-01-01'
and emp_no in (select emp_no from emp_bonus);