oracle之union用法实例
来源:互联网 发布:js点击按钮弹出对话框 编辑:程序博客网 时间:2024/06/04 18:15
govsdm_project :A表
govsdm_projectitem :B表
已知A表和B表中都有部门id(dept_id),现要查询A表和B表记录所涉及的部门总数(不重复)。
union 和 union all都要求两个sql查询列要相同;
union:联合查询出并集(会去除重复记录);
union all:联合查询出并集,包含重复记录;
select count(1) from ( select dept_id from govsdm_project a where a.is_use='0' union select dept_id from govsdm_projectitem b where b.is_use='0' )
阅读全文
0 0
- oracle之union用法实例
- Oracle union用法
- Oracle union用法
- Oracle union用法
- Oracle union用法
- oracle union 用法
- oracle union用法
- Oracle union用法
- oracle union 用法总结
- oracle union 用法
- oracle union 用法
- oracle union 用法
- oracle union的用法
- Mysql之Union用法
- mysql之union用法
- Oracle 之Union all
- oracle 中的Union的用法
- Oracle 中union的用法
- java编写购物管理系统1----下载
- oracleday02(启动流程 认证方式)
- JAVA中关于链表的操作和基本算法
- poj-2806-公共子序列-C语言-动态规划
- 快排思想 求第(前)k大数
- oracle之union用法实例
- Machine learning for openCV 学习笔记 day1
- 解决AndroidStudio出现Error:svn: E155004: Run 'svn cleanup' to remove locks
- (读书笔记)《玩着玩着就能成为PPT高手》——反面教材
- Android 使用WebView加载含有echarts的页面,截图不显示的解决方式
- 设计模式中接口回调的意义
- ajax提交多个参数时,如果需要在url上拼接的写法
- 艾奇全能视频转换器 v4.10.1102免费版
- window下的native链接虚拟机上的mysql数据库