为什么我们需要左右联接 [英] why we have need of left and right join

查看:122
本文介绍了为什么我们需要左右联接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一次采访中有人问我,为什么我们需要分别使用左右联接,而通过改变表的顺序使用它们中的任何一个,我们都可以获得相同的结果?请帮我.

I have been asked in an interview that why we need left and right join separately while we can get same result by using any of them by changing the order of table? Please help me.

推荐答案

如果只有2个表要联接,则,您将看到区别全部.

If you only have 2 tables to join, then yes, you will not see the difference at all.

但是对于3个或更多表,要联接的表的顺序很重要.

But for 3 or more tables, the order of the tables being joined matters.

选中此问题,以查看以下示例它.

Check this question to see examples of it.

这篇关于为什么我们需要左右联接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆