首页 > 数据库技术 > 详细

Oracle连接查询内容整理

时间:2015-10-29 23:19:13      阅读:300      评论:0      收藏:0      [点我收藏+]

--内连接
--select t.*,b.bumenmc from T_HQ_RYXX t,t_hq_bm b where t.bum = b.bumenbm
--select * from t_hq_ryxx t join t_hq_bm b on t.bum in b.bumenbm

--自连接
--select * from t_hq_ryxx a,t_hq_ryxx b where a.bum in b.bum and a.xingb = 2;

--左连接
--select * from t_hq_ryxx a left join t_hq_bm b on a.bum = b.bumenbm;
--select * from T_HQ_RYXX t,t_hq_bm b where t.bum = b.bumenbm(+)

--右连接
--select * from t_hq_ryxx a right join t_hq_bm b on a.bum = b.bumenbm;
--select * from T_HQ_RYXX t,t_hq_bm b where t.bum(+)= b.bumenbm

--全连接
--select * from t_hq_ryxx a full join t_hq_bm b on a.bum = b.bumenbm;

select * from T_HQ_RYXX t,t_hq_bm b where t.bum= b.bumenbm(+)

Oracle连接查询内容整理

原文:http://www.cnblogs.com/shadowduke/p/4922031.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!