[thelist] SQL - Complex Conditional Join? Help needed.

rudy r937 at interlog.com
Sun Mar 18 16:05:43 CST 2001

hi joshua

you need a left join, to select rows from the left table no matter what,
plus rows from the right table if they match

what database are you using?

    _type.name as src
,  _type_src.name AS src_name
  FROM _type LEFT JOIN _type_src
        ON _type.type_src_id = _type_src.id

this should give all rows of _type, with the name column from _type_src if
the rows match as defined by the ON clause

(if this don't work it's because i'm piss drunk at the moment)


More information about the thelist mailing list