left join on 后面可以加where吗

如题所述

可以的
-- 不加 where 
select * from table_a a left join table_b b 
on a.id = b.id 
-- 加 where
select * from table_a a left join table_b b 
on a.id = b.id 
where a.class ='one'

温馨提示:答案为网友推荐,仅供参考
第1个回答  2015-06-05
select *
from a left join b on a.id=b.id and a.sid=b.sid
where xxxxxx
只有这样的用法
相似回答