问题描述
内部联接和外部联接之间的差异.我正在使用两个表,并且想从两个表中获取数据,因此我们应该使用拥有哪种类型的连接才能解决我们的问题
Difference between inner and outer join. i am using two table and want to fetch data from both table so which type join we should use owning of that we can solve our problem
推荐答案
内部联接-使用任一等效查询的内部联接给出两个表的交集,即它们共有的两行.
左外连接-左外部联接将给出A中的所有行,以及B中的所有常见行.
完全外部联接-完整的外部联接将为您提供A和B的并集,即A中的所有行和B中的所有行.如果A中的某物在B中没有对应的基准,则B部分为空,反之反之亦然.检查此
Inner join - An inner join using either of the equivalent queries gives the intersection of the two tables, i.e. the two rows they have in common.
Left outer join -A left outer join will give all rows in A, plus any common rows in B.
Full outer join -A full outer join will give you the union of A and B, i.e. All the rows in A and all the rows in B. If something in A doesn't have a corresponding datum in B, then the B portion is null, and vice versa.check this
这篇关于内部联接和外部联接有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!