Preface – This post is part of the ABAP Beginner series.
Table of Contents
Inner Join and Outer Join
Inner Join and Outer Join are the two different ways to join two tables. Both of them produce different result. In this article we will learn both of them.
Suppose you have two tables with two fields and following data as shown below:
Now if you want data that is common in both the table then you will apply Inner Join and get following results:
And if you want all data irrespective of its presence in any table, you will apply outer join and get results as shown below:
Now let see definition of both of the Joins.
A join that is utilized by Database views which gives the cross-product of the records present in both table.[For basics of Joins click here]
A join that shows the cross-product of all the records present in different tables. It is utilized by Help Views, Projection Views and Maintenance Views. [For basics of Views click here]
It is of two types:
- Left Outer Join: It is just like outer join, it includes all the results of Outer Join with all data from the left table.
- Right Outer Join: It is also just like outer join, it includes all the results of Outer Join with all data from the right table.