您可以在同一个 select 语句中增加 2 个不同工作 ID 的薪水吗?

Can you increase the salary for 2 different job ID's in the same select statement?

我必须列出员工 ID、全名、职位 ID,并修改月收入(未增加)在 $6,000 – $11,000 范围之外的员工的工资。他们必须被聘为副总裁或经理。

副总裁需要加薪 30%,经理需要加薪 20%。

这是我到目前为止的想法:

SELECT 'Emp# ' || employee_id AS "Emp#", 
       first_name || ' ' || last_name
       || ' is ' || Job_id || ' and will get a new salary of '
       || (salary + (salary*0.20))
 FROM employees
WHERE (job_id LIKE '%VP%' OR job_id LIKE '%MAN%')
  AND (salary > 11000 OR salary < 6000);

现在我给副总裁和经理加薪 20%,但我需要给副总裁加薪 30%,给经理加薪 20%。

我可以在一个 select 声明中同时进行这两项加薪,还是必须分开进行?

你可以像下面这样做一个 case 语句

case when job_id like '%VP%' then 1.3 else 1.2 end * salary