问题
1.把名字为"a"的工资(salary)提升10.5%
2.求出department_id为30的department_name和员工的数量 ------解决方案-------------------- update from 表 set salary=salary*1.105 where name='a'
select department_name from 表 where department_id=30 ------解决方案--------------------
--问题一
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'
------解决方案--------------------
UPDATE employees
SET salary = salary * 1.105
WHERE NAME = 'a'
SELECT departmentname ,
COUNT(1) 员工数量
FROM department
WHERE department_id = 30
GROUP BY departmentname