<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Inner join and left outer join in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-and-left-outer-join/m-p/5209715#M1205137</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Inner join is used to get all enteries fronm 2nd table which has it's corresponding in 1st table, means on which field condition inner join is made.&lt;/P&gt;&lt;P&gt;but suppose in ist table there is a field which has a value but in inner join table that field has no corresponding value than the field of ist table will also not be shown while selecting.means value of the fields from both table will not be picked. &lt;/P&gt;&lt;P&gt;but when u use left outer join it will pick the values from ist table too however it have no corresponding value in 2nd table.&lt;/P&gt;&lt;P&gt;in short.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;The INNER JOIN keyword return rows when there is at least one match in both tables.
The LEFT Outer JOIN keyword returns all rows from the left table (table_name1), even if there are 
no matches in the right table (table_name2).


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;hope u got it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: tahir naqqash on Feb 22, 2009 2:06 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 22 Feb 2009 09:02:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-22T09:02:27Z</dc:date>
    <item>
      <title>Inner join and left outer join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-and-left-outer-join/m-p/5209714#M1205136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was create join between 7 tables in my query , how can i know when i must to use with inner join and when use with left outer join , and i want to know what is the different with inner join and left outer join generally ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Feb 2009 08:55:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-and-left-outer-join/m-p/5209714#M1205136</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-22T08:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join and left outer join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-and-left-outer-join/m-p/5209715#M1205137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Inner join is used to get all enteries fronm 2nd table which has it's corresponding in 1st table, means on which field condition inner join is made.&lt;/P&gt;&lt;P&gt;but suppose in ist table there is a field which has a value but in inner join table that field has no corresponding value than the field of ist table will also not be shown while selecting.means value of the fields from both table will not be picked. &lt;/P&gt;&lt;P&gt;but when u use left outer join it will pick the values from ist table too however it have no corresponding value in 2nd table.&lt;/P&gt;&lt;P&gt;in short.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;The INNER JOIN keyword return rows when there is at least one match in both tables.
The LEFT Outer JOIN keyword returns all rows from the left table (table_name1), even if there are 
no matches in the right table (table_name2).


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;hope u got it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: tahir naqqash on Feb 22, 2009 2:06 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Feb 2009 09:02:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-and-left-outer-join/m-p/5209715#M1205137</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-22T09:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join and left outer join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-and-left-outer-join/m-p/5209716#M1205138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please [search|https://www.sdn.sap.com/irj/scn/advancedsearch?query=inner&lt;EM&gt;join&lt;/EM&gt;and&lt;EM&gt;left&lt;/EM&gt;outer+join&amp;amp;cat=sdn_all] the SCN before the Posting. You can find the lot of thread's for your query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Feb 2009 09:03:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-and-left-outer-join/m-p/5209716#M1205138</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-22T09:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join and left outer join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-and-left-outer-join/m-p/5209717#M1205139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sap help has all answers for such generic queries so make an habit of searching the answer urself&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ec77446011d189700000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ec77446011d189700000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ec77446011d189700000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ec77446011d189700000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="16" __jive_macro_name="size"&gt;кu03B1ятu03B9к&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Feb 2009 09:09:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-and-left-outer-join/m-p/5209717#M1205139</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-22T09:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join and left outer join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-and-left-outer-join/m-p/5209718#M1205140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inner join produces a result set of only those records from the left(outer) table for which  there is a corresponding entry in the right(inner) table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left outer join produces a result set of all records from the left(outer) table irrespective of whether there is a corresponding entry in the right(inner) table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use inner join when u want to combine two tables  based on common field values.Else use left outer join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tab1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f1   f2   f3&lt;/P&gt;&lt;P&gt;a1  b1  c1&lt;/P&gt;&lt;P&gt;a2  b2  c2&lt;/P&gt;&lt;P&gt;a3  b3  c3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tab1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f1   f2   f4&lt;/P&gt;&lt;P&gt;a1  b1  d1&lt;/P&gt;&lt;P&gt;a2  b2  d2&lt;/P&gt;&lt;P&gt;a4  b4  d4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT s&lt;SUB&gt;f1 s&lt;/SUB&gt;f2 s&lt;SUB&gt;f3  p&lt;/SUB&gt;f4 INTO TABLE itab&lt;/P&gt;&lt;P&gt;FROM tab1 AS s INNER JOIN tab2 AS p &lt;/P&gt;&lt;P&gt;ON s&lt;SUB&gt;f1   =  p&lt;/SUB&gt;f1  AND s&lt;SUB&gt;f2 = p&lt;/SUB&gt;f2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;result:(for f1=a3 and f2=b3 there is no entry in tab2 .....so that row is not included in itab)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;itab&lt;/STRONG&gt;  &lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;f1   f2   f3     f4&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a1  b1  c1     d1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a2  b2  c2      d2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT s&lt;SUB&gt;f1 s&lt;/SUB&gt;f2 s&lt;SUB&gt;f3  p&lt;/SUB&gt;f4 INTO TABLE itab&lt;/P&gt;&lt;P&gt;FROM tab1 AS s LEFT OUTER JOIN tab2 AS p &lt;/P&gt;&lt;P&gt;ON s&lt;SUB&gt;f1   =  p&lt;/SUB&gt;f1  AND s&lt;SUB&gt;f2 = p&lt;/SUB&gt;f2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;result:(for f1=a3 and f2=b3  row is  included in itab)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;itab&lt;/STRONG&gt;  &lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;f1   f2   f3    f4&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a1  b1  c1    d1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a2  b2  c2    d2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a3  b3  c3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Feb 2009 09:17:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-and-left-outer-join/m-p/5209718#M1205140</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-22T09:17:35Z</dc:date>
    </item>
  </channel>
</rss>

