//查询单个帖子的回帖数select count(*) from 回帖表,发帖表 where 回帖表.贴子id=发帖表.帖子id//查询所有帖子的回帖数select 发帖表.帖子id,count(*) as 回帖数 from 回帖表,发帖表 where 回帖表.贴子id=发帖表.帖子idgroup by 发帖表.帖子id