------解决方案-------------------- select proid,count(1) from proPlan group by proid
------解决方案--------------------
对你的要求还是不是很明白
SQL code
select b.proid,count(1) countPro
from proinfo a inner join proPlan b on a.proid=b.proid
group by b.proid
------解决方案-------------------- 晕,看你代码和你的描述出入很大哦
------解决方案--------------------
SQL code
select a.proid,count(b.proid) as countPro
from proinfo a inner join proPlan b on a.proid=b.proid
------解决方案--------------------