当left outer join 的时候,你应该选择on 仍是where

select a.* from a  left outer join b on a.id = b.aid left outer join c on a.id = c.cid  -- and c.code = b.code  -- where c.code=b.code code ; ci 其中 c.code=b.code 在left join的时候回保留a中的空值select 可是放到where中
相关文章
相关标签/搜索