数据库ALL和ANY的区别
来源:互联网 发布:wav格式播放器 mac 编辑:程序博客网 时间:2024/05/21 18:51
这两个都是用于子查询的
any 是任意一个
all 是所有
any表示有任何一个满足就返回true,all表示全部都满足才返回true
比如 :
select * from student where 班级=’01’ and age > all (select age from student where 班级=’02’);
就是说,查询出01班中,年龄大于 02班所有人的同学 相当于
select * from student where 班级=’01’ and age > (select max(age) from student where 班级=’02’);
而
select * from student where 班级=’01’ and age > any (select age from student where 班级=’02’);
就是说,查询出01班中,年龄大于 02班任意一个 的 同学 相当于
select * from student where 班级=’01’ and age > (select min(age) from student where 班级=’02’);
阅读全文
0 0
- 数据库ALL和ANY的区别
- 数据库中Any和All区别
- all和any的区别测试
- any,some,all的用法和区别
- python中all()和any()的区别
- SQL中ALL、Any、Some的区别
- sql中any,all,some的区别
- oracle中all,any的区别使用
- Oracle的SOME,ANY和ALL操作
- sql酷毙的any和all
- python any和all
- sql里in,all,any,some的区别和具体应用范围
- sqlserver中All、Any和Some用法与区别
- Oracle 查询语句 all any some 含义和区别
- sqlserver中All、Any和Some用法与区别
- sqlserver中All、Any和Some用法与区别
- sqlserver中All、Any和Some用法与区别
- mysql之any,in,some,all的区别
- iOS模态跳转的页面WebView中加载html调用本机相册会dismiss返回上一个页面解决办法
- Windows系统下简易cms集成搭建(Apache+php+MySQL)
- Unit 8
- 学习git 和遇到的一个git问题的解决方案 2017-02 学习
- 扩增子分析解读3格式转换,去冗余,聚类
- 数据库ALL和ANY的区别
- 算法题目---扑克牌的顺子
- python安装igraph完整安装教程(win7 32位电脑)
- scrapy-culster集群搭建之kafka安装
- java for 循环执行顺序
- Centos 6.5本地yum源配置
- 房间图片,临时
- Least Common Multiple
- 百度之星5697