Learn SQL Join,Inner Join, Outer Join
来源:互联网 发布:企业域名代备案 编辑:程序博客网 时间:2024/05/16 18:38
For Example:
Table A have 12( 8+4) entries, 8 entries have valid relation with B
Table B have 80(77+3) entries , 77 entries have valid relation with A.
then the return amount of join is :
cross join : 12*80
inner join : 77
full outer join : 77+4+3
left outer join: 77 + 4
right outrer join: 77 + 3
INNER Join code as the following:
Select * from A a, B b where a.categoryID = b.categoryID;
equals:
Select * from A a inner join B b on a.categoryID = b.categoryID;
OUTER Join code as the following
select * from A a full(left/right) outer join B b on a on a.categoryID = b.categoryID;
left/right outer join claus specific for MSSQL:
Select * from A a, B b where a.categoryID *= bcategoryID;
elect * from A a, B b where a.categoryID =* b.categoryID;
left/right outer join claus specific for Oracle:
Select * from A a, B b where a.categoryID = b.categoryID(+);
Select * from A a, B b where a.categoryID (+) = b.categoryID;
Good Resources:
http://www.w3schools.com/sql/sql_join.asp
http://www.techonthenet.com/sql/joins.htm
Table A have 12( 8+4) entries, 8 entries have valid relation with B
Table B have 80(77+3) entries , 77 entries have valid relation with A.
then the return amount of join is :
cross join : 12*80
inner join : 77
full outer join : 77+4+3
left outer join: 77 + 4
right outrer join: 77 + 3
INNER Join code as the following:
Select * from A a, B b where a.categoryID = b.categoryID;
equals:
Select * from A a inner join B b on a.categoryID = b.categoryID;
OUTER Join code as the following
select * from A a full(left/right) outer join B b on a on a.categoryID = b.categoryID;
left/right outer join claus specific for MSSQL:
Select * from A a, B b where a.categoryID *= bcategoryID;
elect * from A a, B b where a.categoryID =* b.categoryID;
left/right outer join claus specific for Oracle:
Select * from A a, B b where a.categoryID = b.categoryID(+);
Select * from A a, B b where a.categoryID (+) = b.categoryID;
Good Resources:
http://www.w3schools.com/sql/sql_join.asp
http://www.techonthenet.com/sql/joins.htm
- Learn SQL Join,Inner Join, Outer Join
- SQL中的各种JOIN(inner join,cross join,full outer)
- SQL中inner join、outer join和cross join
- SQL中inner join、outer join、cross join 的区别
- SQL中的各种JOIN(inner join,full outer join,left join,right join,cross join )
- SQL join,left join ,right join , inner join , outer join用法解析及HIVE join 优化
- 【SQL】inner join、outer join、cross join和left join、right join、full join的区别
- SQL中 inner join、 left outer join 、right outer join、 full outer join之间的区别
- inner join 和outer join
- Mysql Inner Join , Outer Join
- Linq INNER JOIN / OUTER JOIN
- inner join 和 outer join
- join联接查询--SQL中 inner join、 left join 、right join、 outer join之间的区别
- 关于sql的full outer join,left join,right join,inner join, cross join 的说明
- SQL的JOIN语法解析(inner join, left join, right join, full outer join的区别)
- SQL的JOIN语法解析(inner join, left join, right join, full outer join的区别)
- SQL中LEFT JOIN、Inner Join、Right Join、Left Outer Join、full join区别
- Sql语句中的inner join ,left outer join ,right outer join ,full join 的理解
- 一切有为法
- Eclipse-一个我熟悉一点的java开发工具
- 看一小会儿COM所做笔记
- 軟件文檔網址(軟件測試等)
- C#中实现字符截取
- Learn SQL Join,Inner Join, Outer Join
- 什么是6西格玛管理
- [转]2005年依始奥索推出综合网站排名搜狐傲立鸡群[1.3-1.9]
- 鲜为人知的SAS9 多线程技术
- Google Hack
- Sometimes Java 的blog
- 平衡计分卡简史
- QT中关于信号与槽机制的实现原理
- Extensible Markup Language (XML) 1.0 (Third Edition)