oracle 子查询写法
浏览:2471次 出处信息
1
select sub_table.num,sub_table.job_id
from (
select count(*) as num,t.job_id
from dir_irai t group by t.job_id order by num desc
)
sub_table where sub_table.num>1
2
select distinct sub_table.num,t2.job_id,t2.anken_id,t2.job_id
from (
select count(*) as num,t.job_id
from dir_irai t group by t.job_id order by num desc
)
sub_table,dir_irai t2 where sub_table.num>1 and sub_table.job_id=t2.job_id order by t2.job_id
建议继续学习:
QQ技术交流群:445447336,欢迎加入!
扫一扫订阅我的微信号:IT技术博客大学习
扫一扫订阅我的微信号:IT技术博客大学习
<< 前一篇:SSH下连接Oracle的方法
文章信息
- 作者:rethink 来源: 博客园-rethink log
- 标签: 子查询
- 发布时间:2010-06-12 17:47:48
近3天十大热文
-
[61] ABTest 平台设计 - 如何进行流量分桶
-
[47] 如何拿下简短的域名
-
[44] 图书馆的世界纪录
-
[43] android 开发入门
-
[42] 【社会化设计】自我(self)部分――欢迎区
-
[42] Oracle MTS模式下 进程地址与会话信
-
[41] 流程管理与用户研究
-
[41] Twitter/微博客的学习摘要
-
[40] IOS安全–浅谈关于IOS加固的几种方法
-
[40] WEB系统需要关注的一些点