直接group by 不就可以了?
select 文章分类,count(*)from 表
group by 文章分类
是要这样吗
select a.colid,sum(1) as articlecountfrom category as a inner join article as b
on a.colid=b.colid
欢迎分享,转载请注明来源:内存溢出
直接group by 不就可以了?
select 文章分类,count(*)from 表
group by 文章分类
是要这样吗
select a.colid,sum(1) as articlecountfrom category as a inner join article as b
on a.colid=b.colid
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)