mysql 多表查询 求帮助

2025-05-15 17:11:55
推荐回答(1个)
回答1:

用分组group by 可以,查到最大或最小的imgid
然后再表连接 显示数据即可
比如:
select * from b
inner join (
slect max(imdid) mimgid from a
inner join B on a.proid=b.proid
) x
on x.mimgid=b.imgid