Left Outer join and an additional where clause

前端 未结 5 977
南方客
南方客 2020-12-18 18:05

I have a join on two tables defined as a left outer join so that all records are returned from the left hand table even if they don\'t have a record in the right hand table.

5条回答
  •  再見小時候
    2020-12-18 18:24

    SELECT x.fieldA, y.fieldB
    FROM x
    LEFT OUTER JOIN (select fieldb, fieldc from Y where condition = some_condition)
    ON x.fieldc = y.fieldc
    

提交回复
热议问题