oracle 子查询写法
浏览:2496次 出处信息
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天十大热文
-
[82] memory prefetch浅析
-
[53] 转载:cassandra读写性能原理分析
-
[51] 深入浅出cassandra 4 数据一致性问
-
[51] 基本排序算法的PHP实现
-
[46] 字符引用和空白字符
-
[42] Inline Form Labels
-
[41] 获取Dom元素的X/Y坐标
-
[41] MySQL半同步存在的问题
-
[40] javascript插入样式
-
[40] JS中如何判断字符串类型的数字