mysql 三表联合查询

2025-03-23 13:03:15
推荐回答(2个)
回答1:

使用UNION联合两个语句即可:
select * from a where cid=1
UNION
select * from b where cid=1

回答2:

select * from a as a, b as b where a.cid=b.cid and a.cid=1
是这样吗?