update employees set
salary =
300 + (select avg(salary) from employees where departmentid = 30)
where departmentid = 50
salary =
300 + (select avg(salary) from employees where departmentid = 30)
where departmentid = 50
本文介绍了一种使用SQL更新语句来调整特定部门员工薪资的方法。通过为部门ID为50的所有员工增加基于部门ID为30的员工平均薪资的奖金,实现了薪资调整。

被折叠的 条评论
为什么被折叠?