交集用JOIN
select * from a join b on a.id=b.id差集用left join 或right join
比如a与b的差集:
select * from a left join b on a.id=b.id and b.id is null
select * from a join b on a.id=b.id差集用left join 或right join
比如a与b的差集:
select * from a left join b on a.id=b.id and b.id is null
select a.*,b.* from a,b where a.id=b.id