日期:2014-05-17  浏览次数:20828 次

子查询关于any 的问题
有这样一条语句:
select e.employee_id, e.name, e.salary from employees e
where 5000 < any ( select salary from departments );

假设select salary from departments  返回4500、5600、5800;
那么上述查询语句可能查询出结果(当select salary from departments返回的是4500的时候),也可能什么都查不到是么?
------最佳解决方案--------------------
是的,
select salary from departments 返回4500、5600、5800;
查询结果是employee表中所有数据;

当select salary from departments返回的是4500的时候,
什么也查不到。

------其他解决方案--------------------
知道了,多谢。