1. some/any
一般情况下,some和any效果等同
类似于or操作,选出结果集中的任意一个就可以
只是some常用于等值计算
而any常用于不等值计算,如果是=any 就类似于in
2. all,类and运算
例如>all 则是大于集合中的所有值,可以抽象出来大于集合中的最大值
3. >all
select * from emp where sal >all (950,1600,1110);
比最大的要大,比1600要大的
等价于
select * from emp where sal >1600;
>any
select * from emp where any >any (950,1600,1110);
比最小的要大
比950要大的
等价于
select * from emp where any > 950;
<all
select * from emp where sal <all (950,1600,1110);
比最小的要小
比950还要小
等价于
select * from emp where any < 950;
>any
select * from emp where sal <any (950,1600,1110);
比最大的要小
等价于
select * from emp where any < 1600;
some类似any用法,但是一般用于=等式运算
=some等价于=any等价于in操作
select * from emp where sal =any(900,1500,1600);
select * from emp where sal =some(900,1500,1600);
select * from emp where sal in (900,1500,1600);
以上三条语句等价
oracle some/any/all
原创justforqdj 博主文章分类:oracle相关 ©著作权
文章标签 oracle oracle some/any/all oracle some oracle any oracle all 文章分类 Oracle 数据库
上一篇:sys不能远程登录的问题
下一篇:mysql网络错误的几个错误码

-
oracle union all
select rownum ,r.readdate
oracle union all oracle查询的信息放到最前边 d3 -
oracle insert all 复合表插入
oracle中insert all / first 简单用法
oracle all insert