【问题标题】:Write a query to display list of employees having salary greater than Max salary define for respective JOB_ID编写查询以显示工资大于为相应 JOB_ID 定义的最大工资的员工列表
【发布时间】:2021-08-15 18:43:23
【问题描述】:

这些是 2 个具有共同 job_id 列的表。

【问题讨论】:

标签: sql oracle oracle11g oracle10g


【解决方案1】:

应该是这样的(假设表名是empjob):

select e.employee_id
from emp e
where e.salary > (select j.max_salary
                  from job j
                  where j.job_id = e.job_id
                 );

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-07-24
    • 2020-08-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-28
    相关资源
    最近更新 更多