首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

子查询关于any 的有关问题

2012-12-17 
子查询关于any 的问题有这样一条语句:select e.employee_id, e.name, e.salary from employees ewhere 500

子查询关于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的时候,
什么也查不到。

[其他解释]
知道了,多谢。

热点排行