Skip to Content
author's profile photo
Former Member

Joins(inner,outer,,)

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    author's profile photo
    Former Member
    Sep 30, 2005 at 06:51 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Sep 30, 2005 at 06:53 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 30, 2005 at 06:53 AM

    hi

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

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

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Sep 30, 2005 at 06:59 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded