Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

abap general

Former Member
0 Likes
459

what is INNER JOIN , LEFT OUTER JOIN and RIGHT OUTER JOIN .

3 REPLIES 3
Read only

Former Member
0 Likes
437

example there are two tables TABLE1 and TABLE2

The INNER JOIN returns all rows from both tables where there is a match. If there are rows in TABLE1 that do not have matches in TABLE2, those rows will not be listed.

<b>LEFT JOIN</b>

The LEFT JOIN returns all the rows from the first table (TABLE1), even if there are no matches in the second table (TABLE2).

<b>OUTER JOIN</b>

The RIGHT JOIN returns all the rows from the second table (TABLE2), even if there are no matches in the first table (TABLE1).

REWARD IF USEFUL....

CHEERS,

K.SUNIL KUMAR

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
437

Hi,

Resulting set for inner join

The inner join joins the columns of every selected line on the left- hand side with the columns of all lines on the right-hand side that jointly fulfil the join_cond condition. A line in the resulting set is created for every such line on the right-hand side. The content of the column on the left-hand side may be duplicated in this case. If none of the lines on the right-hand side fulfils the join_cond condition, no line is created in the resulting set.

Resulting set for outer join

The outer join basically creates the same resulting set as the inner join, with the difference that at least one line is created in the resulting set for every selected line on the left-hand side, even if no line on the right-hand side fulfils the join_cond condition. The columns on the right-hand side that do not fulfil the join_cond condition are filled with null values.

Regards,

Sesh

Read only

Former Member
0 Likes
437

HI,

INNER JOIN - WHEN USED BETWEEN 2 TABLES ALL COMMON FIELDS IN BOTH TABLES CAN BE SELECTED.

OUTER JOIN - WHEN USED B/W TWO TABLES ALL COMMON FIELDS OF BOTH TABLES AND REMAINING FIELDS OF 1ST TABLE CAN BE SELECTED.

LEFT OUTER JOIN - SAME AS OUTER JOIN.

RIGHT OUTER JOIN - WHEN USED B/W TWO TABLES ALL COMMON FIELDS OF BOTH TABLES AND REMAINING FIELDS OF 2ST TABLE CAN BE SELECTED.

IF HELPFUL REWARD SOME POINTS,

WITH REGARDS,

SURESH.A