-- solution 1:子查询
UPDATE salaries s
SET salary = salary * 1.1
WHERE s.to_date = '9999-01-01'
AND s.emp_no in (SELECT emp_no FROM emp_bonus)
-- solution 2:JOIN
# UPDATE salaries s
# JOIN emp_bonus eb
# USING (emp_no)
# SET salary = salary * 1.1
# WHERE to_date = '9999-01-01'