ANSI JOIN vs. OUTER JOIN

  • Here is the sample

  • Oops, I do not see any sample. Can U pls check again.

    Thanks

    Prasad Bhogadi
    www.inforaise.com

  • Sample in PSS ID Number: 176480

    Old style outer join in pubs database

    SELECT titles.title_id, title, qty

       FROM titles, sales

       WHERE titles.title_id *= sales.title_id

       AND stor_id = '7066'

    is not the same as

    SELECT titles.title_id, title, qty

       FROM titles LEFT OUTER JOIN sales

       ON titles.title_id = sales.title_id

       WHERE stor_id = '7066'

    The ansi version is actually becomes inner join. The correct conversion should be

    SELECT titles.title_id, title, qty

       FROM titles LEFT OUTER JOIN sales

       ON titles.title_id = sales.title_id

       AND stor_id = '7066'

     

  • My goodness I am so ignorant, I thought Left Outer Join itself is been replaced with some other syntax  based on what I heard, I now believe that I am using the correct ANSI syntax and I donot need to change anything.

     

    Thanks alot for the quick response.

    Prasad Bhogadi
    www.inforaise.com

Viewing 4 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply