交集就是两表的join 连接查询如:SELECT ... FROM a JOIN b ON a.id=b.id并集可用Union差集可用空值判断。如:SELECT ... FROM a LEFT JOIN b ON a.id=b.id WHERE isNull(b.id)=true