Query with Outer join

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chicane
    New Member
    • Dec 2009
    • 8

    Query with Outer join

    Hi

    I have the query below:

    select * from parts where pnum
    not in (select pnum from supply where
    pnum is not null);

    I now need to write the same query but with an outer join?
    I have tried various things but can't get it to work.
    any suggestions would be appreciated.

    many thanks
  • nbiswas
    New Member
    • May 2009
    • 149

    #2
    Solution to Query with Outer join

    Try:

    Code:
    select p.* from parts p, supply s
    where p.pnum     =  s.pnum (+)
    Note: An outer join uses a (+) on the side of the operator (which in this case happens to be the equality operator) where we want to have nulls returned if no value matches

    Hope this helps

    Comment

    • amitpatel66
      Recognized Expert Top Contributor
      • Mar 2007
      • 2358

      #3
      You would also be interested in looking at Different Types of Outer Joins in oracle

      Comment

      • chicane
        New Member
        • Dec 2009
        • 8

        #4
        Hi
        Thanks for the link I found it very helpful.

        Comment

        Working...