一对多写了mapper映射之后
根据条件查条数 可以根据主表的唯一id进行分组
在拿到它的count
select count(0) over(aa.id),,id,name,age from tab1 aa
left join tab2 bb
on aa.id = bb.id
group by aa.id
手机扫一扫
移动阅读更方便
你可能感兴趣的文章
4