Outer Joins

  • Hi

    till today I am working in Oracle I would like to know how to use outer join concept with *= and =* operators.

    I used both of them but could not findout the difference.

     

  • Strange deja vu

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=23&messageid=111847

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • I would not use the =* *= syntax; BOL states that syntax may not be supported in a future version of SQL Server. Instead use the ANSI SQL-92 syntax LEFT OUTER JOIN etc. Note that Oracle 9i supports the ANSI SQL-92 join syntax so your queries can use the same join syntax as sql server. If you are are using Oracle 8i then you must use the Oracle =+ and += join synax ( see below)

    MS SQL Server

    ORACLE 8i

    SELECT PERSON.*

    FROM ADDRESS LEFT OUTER JOIN

        PERSON ON ADDRESS.PERSON_ID = PERSON.ID

    SELECT PERSON.*

    FROM ADDRESS, PERSON

    WHERE ADDRESS.PERSON_ID = PERSON.ID (+)

    MS SQL Server

    ORACLE 8i

    SELECT PERSON.*

    FROM ADDRESS RIGHT OUTER JOIN

        PERSON ON ADDRESS.PERSON_ID = PERSON.ID

    SELECT PERSON.*

    FROM ADDRESS, PERSON

    WHERE ADDRESS.PERSON_ID (+) = PERSON.ID

     

     

     

     

     

Viewing 3 posts - 1 through 2 (of 2 total)

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