Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Difference- in conditions (Join and Where Clause)

Mark CooperSep 19 2013 — edited Sep 20 2013

Hi Folks,

I need to be clear about what exactly difference when we put any condition in INNER JOIN and WHERE Clause.

I tried both way and found same results. Even in Statistics Plan not much differences.  All Help would be appreciated.

Like:

1. Here I am using location filter in Inner join condition -

"SELECT I.*, Gl * From Sc1.Item I

   Inner Join Sc1.Part P

            On P.Part_Id = I.Part_Id

       Inner Join Sc1.Location Gl

            On Gl.Location_Id = I.Location_Id

              And Gl.Location_Id In ( 1767, 1747,202,1625)

    Inner Join Sc1.Condition C

        On C.Condtion_Id = Gl.Condition_Id

Where  I.Inactive_Ind = 0

      And I.Condition_Id != 325

         

2. Here I am using location filter in Where clause -         

          SELECT I.*, Gl * From Sc1.Item I

   Inner Join Sc1.Part P

            On P.Part_Id = I.Part_Id

       Inner Join Sc1.Location Gl

            On Gl.Location_Id = I.Location_Id

        Inner Join Sc1.Condition C

        On C.Condtion_Id = Gl.Condition_Id

Where  I.Inactive_Ind = 0

       and I.LOCATION_ID in ( 1767, 1747,202,1625)

          And I.Condition_Id != 325

Thanks,

Mark



This post has been answered by Frank Kulash on Sep 19 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 18 2013
Added on Sep 19 2013
23 comments
3,247 views