ORACLE 函数minus、intersect、union、union all 用法
来源:互联网 发布:js array split 编辑:程序博客网 时间:2024/05/22 15:30
1、oracle函数minus的作用简单来说就是“去同留异”
select ord.member_id
from wltdata.wlt_order_info ord, wltdata.wlt_sub_order_info sub
where ord.id_wlt_order_info = sub.wlt_order_info_id
and ord.created_date >= sysdate - 2
and rownum <= 10
--order by 1
minus
select ord.member_id
from wltdata.wlt_order_info ord, wltdata.wlt_sub_order_info sub
where ord.id_wlt_order_info = sub.wlt_order_info_id
and ord.created_date >= sysdate - 1
and rownum = 10
--order by 1
注意:1、放开 order by 报:ORA-00933: SQL 命令未正确结束;2、rownum 表示:伪列 ,每个表都有伪列。
2、oracle函数intersect的作用“取交集”用法同上。
3、union表示“并”,当用得时候,系统会自动将重复的元组去掉,如果想保留重复元组则就用union all
0 0
- ORACLE 函数minus、intersect、union、union all 用法
- oracle MINUS INTERSECT UNION ALL
- oracle 的 union union all intersect minus用法
- ORACLE中union/union all/Intersect/Minus用法
- ORACLE中union/union all/Intersect/Minus用法
- Oracle集合操作函数:Union、Union All、Intersect、Minus
- Oracle集合函数:Union、Union All、Intersect、Minus等
- Intersect、minus、union、union all用法
- UNION,UNION ALL,MINUS,INTERSECT用法
- Oracle中的Union、Union All、Intersect、Minus
- Oracle Union/Union All/Intersect/Minus区别
- Oracle中的Union、Union All、Intersect、Minus
- oracle union union all intersect minus
- Oracle中的Union、Union All、Intersect、Minus
- Oracle 中的Union、Union All、Intersect、Minus
- Oracle中的Union、Union All、Intersect、Minus
- oracle:union、union all、intersect、minus
- oracle union union all intersect minus
- 无Plan无Todo,不Work
- ubuntu 12.04上不了网
- 【我的问题】关于cursor查询的用法的注意事项(Index -1 requested, with a size of 1)
- 关于类中成员的权限
- Tomcat如何设置默认项目 在浏览器中输入localhost:8080 可直接访问项目
- ORACLE 函数minus、intersect、union、union all 用法
- 修改2003服务器系统默认的administrator帐号
- android--UIWebView--隐藏滚动条(解决方案)
- vector-入门(一)
- 如果,我们变成回忆
- Python 迭代器 & __iter__方法
- LightOJ 1140 - How Many Zeroes? (数位dp)
- 线程的修炼1
- artdialog在ie下点击关闭会嵌入到页面中的解决办法