ITPub博客

首页 > 数据库 > Oracle > What's the different between left joint and right joint in PLSQL?

What's the different between left joint and right joint in PLSQL?

原创 Oracle 作者:YoungEric 时间:2007-09-18 08:02:04 0 删除 编辑

You can see the different between left joint and right joint by a simple example!

[@more@]

SQL> SELECT * FROM T_0918;

ID T_A
---------- ----------
1 A1
2 A2

4 A4

SQL> SELECT * FROM T_0918_2;

ID T_B
---------- ----------
1 B1
2 B2
3 B3

SQL> SELECT T_A,T_B FROM T_0918,T_0918_2
2 WHERE T_0918.ID(+)=T_0918_2.ID;

T_A T_B
---------- ----------
A1 B1
A2 B2
B3

SQL> SELECT T_A,T_B FROM T_0918,T_0918_2
2 WHERE T_0918.ID=T_0918_2.ID(+);

T_A T_B
---------- ----------
A1 B1
A2 B2

A4

SQL> SELECT T_A,T_B FROM T_0918,T_0918_2
2 WHERE T_0918.ID=T_0918_2.ID;

T_A T_B
---------- ----------
A1 B1
A2 B2

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10484922/viewspace-969829/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2007-12-18

  • 博文量
    79
  • 访问量
    211217