子查询1:
select employee_id,last_name,salary
from employees
where salary > (select round(avg(salary),0)
from employees
)
order by salary
子查询2:
select employee_id,last_name,salary
from employees
where salary > all (select round(avg(salary),0)
from employees
)
order by salary
答案 0 :(得分:0)
我无法想到手头的任何差异。子查询只返回一行 - 平均工资。 all
关键字的存在与否对于标量子查询并不重要。如果salary
仅为NULL
,则两个查询都不会返回任何行。