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

Joins(inner,outer,,)

Former Member
0 Likes
691

Hi all,

Could anyone let me know regarding Joins. What is the difference b/w inner and outer joins. And left outer join, right outer joins...

Thanks

Chand

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
663

Hi chand,

below link will help you.

http://help.sap.com/saphelp_erp2004/helpdata/en/cf/21ec77446011d189700000e8322d00/frameset.htm

http://help.sap.com/saphelp_erp2004/helpdata/en/f1/713c3b35703079e10000000a114084/frameset.htm

reward points for helpfull answers and close the thread if your quesiton is solved.

regards

venu.

4 REPLIES 4
Read only

Former Member
0 Likes
664

Hi chand,

below link will help you.

http://help.sap.com/saphelp_erp2004/helpdata/en/cf/21ec77446011d189700000e8322d00/frameset.htm

http://help.sap.com/saphelp_erp2004/helpdata/en/f1/713c3b35703079e10000000a114084/frameset.htm

reward points for helpfull answers and close the thread if your quesiton is solved.

regards

venu.

Read only

Former Member
0 Likes
663

Hi

JOIN is always applied betweeen two tables. If u want to get all matching records from both table u use Inner Join on aparticular field. Records in both table having the same value for that field will be retrieved with he Join. Usually we use it to relate the parent and child tables.

Incase of Outer Joins, even if there is not common value for that field on which we r joining, the records will be fetched. For the table row that doesnt have the value, NULL will be inserted. If u want NULL to be inserted on the table on the Left, use Left Outer Join and if u want NULL to be inserted for absent values in the right, use right outer Join.

Read only

Bema
Active Participant
0 Likes
663

hi

Check this link. you will get an idea of SQL joins

http://www.devx.com/dbzone/Article/17403/0/page/4

Read only

former_member221770
Contributor
0 Likes
663

Chand,

Look up SAP Help under SELECT and the FROM clause explains JOINS.

Basically an INNER JOIN means that the link must exist in both tables to return a result.

Table 1

A B C D E

-


a1 b1 c1 d1 e1

a2 b2 c2 d2 e2

a3 b3 c3 d3 e1

Table2

E F G

-


e1 f1 g1

e2 f2 g2

Inner join gives

A B C D E F G

-


a1 b1 c1 d1 e1 f1 g1

a2 b2 c2 d2 e2 f2 g2

a3 b3 c3 d3 e1 f1 g1

An OUTER JOIN (or left outer join) means that the data must exist in the left table but not necessarily in the right table:

Table 1

A B C D E

-


a1 b1 c1 d1 e1

a2 b2 c2 d2 e2

a3 b3 c3 d3 e3

Table2

E F G

-


e1 f1 g1

e2 f2 g2

Outer Join gives

A B C D E F G

-


a1 b1 c1 d1 e1 f1 g1

a2 b2 c2 d2 e2 f2 g2

a3 b3 c3 d3 e3

Hope this helps.

CHeers,

Pat.

PS. Kindly assign Reward Points to the posts you find helpful.