日期:2014-05-17 浏览次数:20848 次
select a.id,a.name,count(*) from 主表A a left join 子表B b on a.id=b.fk_A where 1=1 group by a.id,a.name ------解决方案--------------------
select a.id, a.name,count(*) where a.id = b.fk_a group by a.id, a.name