2008 Apr 17 1:40 PM
what are the various types of joins and what is the diference between them especially in between inner and outer joins.
2008 Apr 17 2:01 PM
In ABAP we have two types of joins which are Inner join and Left outer join.
table1:
-
A hyd
B delhi
C bangalore
table2:
-
A 10
B 20
Inner join: there is always a corresponding line from the two tables then those records only you will get.
table3:
-
A 10 hyd
B 20 delhi
Left outer join: there is no need of corresponding line from the two tables even though you will get all records.
teble3:
-
A 10 hyd
B 20 delhi
C --- bangalore
i hope you understand better now.
Reward if it helpful.
Dara.
what are the various types of joins and what is the diference between them especially in between inner and outer joins.
2008 Apr 17 2:01 PM
In ABAP we have two types of joins which are Inner join and Left outer join.
table1:
-
A hyd
B delhi
C bangalore
table2:
-
A 10
B 20
Inner join: there is always a corresponding line from the two tables then those records only you will get.
table3:
-
A 10 hyd
B 20 delhi
Left outer join: there is no need of corresponding line from the two tables even though you will get all records.
teble3:
-
A 10 hyd
B 20 delhi
C --- bangalore
i hope you understand better now.
Reward if it helpful.
Dara.
2008 Apr 17 2:10 PM
Hi,
Join Conditions
The entire cross product is not usually a sensible selection. The cross product must therefore be restricted with join conditions. A join condition describes how the records of the two tables are connected.
Inner Join and Outer Join
The data that can be selected with a view depends primarily on whether the view implements an inner join or an outer join. With an inner join, you only get the records of the cross-product for which there is an entry in all tables used in the view. With an outer join, records are also selected for which there is no entry in some of the tables used in the view.
The set of hits determined by an inner join can therefore be a subset of the hits determined with an outer join.
Database views implement an inner join. The database therefore only provides those records for which there is an entry in all the tables used in the view. Help views and maintenance views, however, implement an outer join.
2008 Apr 17 2:12 PM
hi,
two types of joins inner and outer join
The data that can be selected with a view depends primarily on whether the view implements an inner join or an outer join.
With an inner join, you only get the records of the cross-product for which there is an entry in all tables used in the view. With an outer join, records are also selected for which there is no entry in some of the tables used in the view.
The set of hits determined by an inner join can therefore be a subset of the hits determined with an outer join.
Database views implement an inner join. The database therefore only provides those records for which there is an entry in all the tables used in the view. Help views and maintenance views, however, implement an outer join.
for example
you have two internal tables
tab1 tab2
f1 f2 f3 f4
1 a 1 d
2 b 2 e
3 c
inner join produces
f1 f2 f4
1 a d
2 b e
outer join produces
f1 f2 f4
1 a d
2 b e
3 c
regards
prasanth
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |