java中outer和inner_Left,Right,Outer和Inner Joins有什么区别?

让它更明显可能会有所帮助 . 一个例子:

表格1:

ID_STUDENT STUDENT_NAME

1 Raony

2 Diogo

3 Eduardo

4 Luiz

表2:

ID_STUDENT LOCKER

3 l1

4 l2

5 l3

我做的是:

-Inner join of Table 1 and Table 2:

- Inner join returns both tables merged only when the key

(ID_STUDENT) exists in both tables

ID_STUDENT STUDENT_NAME LOCKER

3 Eduardo l1

4 Luiz l2

-Left join of Table 1 and Table 2:

- Left join merges both tables with all records form table 1, in

other words, there might be non-populated fields from table 2

ID_ESTUDANTE NOME_ESTUDANTE LOCKER

1 Raony -

2 Diogo -

3 Eduardo l1

4 Luiz l2

-Right join of table 1 and table 2:

- Right join merges both tables with all records from table 2, in

other words, there might be non-populated fields from table 1

ID_STUDENT STUDENT_NAME LOCKER

3 Eduardo l1

4 Luiz l2

5 - l3

-Outter join of table 1 and table 2:

- Returns all records from both tables, in other words, there

might be non-populated fields either from table 1 or 2.

ID_STUDENT STUDENT_NAME LOCKER

1 Raony -

2 Diogo -

3 Eduardo l1

4 Luiz l2

5 - l3

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值