--问题一
update employees
set salary=salary*10.5% where
name='a'
--问题二
select depart_name,COUNT(id)as 员工数量 from
department d
where d.department_id=30 join employees e on
d.department_id=e.department_id
UPDATE employees
SET salary = salary * 1.105
WHERE NAME = 'a'
SELECT departmentname ,
COUNT(b.id) 员工数量
FROM department a
INNER JOIN Employees b ON a.department_id = B.department_id
WHERE department_id = 30
GROUP BY departmentname
------其他解决方案-------------------- full join 是left join 和right join的融合。不一样的。 ------其他解决方案-------------------- update from 表 set salary=salary*1.105 where name='a'
select department_name from 表 where department_id=30 ------其他解决方案--------------------
这个应该这样写吧
update employees
set salary=salary*1.105 where
name='a'