SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Left Outer Join

  1. #1
    $books++ == true matsko's Avatar
    Join Date
    Sep 2004
    Location
    Toronto
    Posts
    795
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Left Outer Join

    I am not entirely sure how the OUTER JOIN statement works in MySQL. Apperantly it is used in conjunction with the LEFT JOIN statement, thus being LEFT OUTER JOIN.

    I know that INNER JOIN statements will only return values where both values within the columns on both tables are matching...

    table1.colum = table2.colum


    I know that with a LEFT join statement that the rows that are non matching will still be returned

    table1.colum = || != table2.colum

    (and the table that doesn't hold the matching row, will be returned as null for each column)

    So if you have both types of joins, one where there must be matches, and one where it can be both, then what does the extended OUTER statement onto the LEFT JOIN statement do?
    I can't believe I ate the whole thing

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,322
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    nice explanation

    OUTER is merely an optional keyword

    LEFT [OUTER] JOIN
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •