select b.*,(select count(a.id) from td_product a where a.protypeid=b.id) num from td_protype b
转载于:https://www.cnblogs.com/shanlin/archive/2011/09/27/2192725.html
select b.*,(select count(a.id) from td_product a where a.protypeid=b.id) num from td_protype b
转载于:https://www.cnblogs.com/shanlin/archive/2011/09/27/2192725.html