SELECT * from A union select * from B  --查询A\B表的并集重复的项只显示一个
SELECT * from A union all select * from B ----查询A\B表的并集重复的也显示
SELECT * from A union all select * from B  order by id asc ---查询A\B表的并集重复的也显示,并按照id升序
SELECT * from A INTERSECT select * from B ----查询两表的交集
SELECT * from A EXCEPT select * from B ----查询A表中不与B表重复的记录
--查询A\B两表中所有非交集的记录
(SELECT * from A EXCEPT select * from B) union (SELECT * from B EXCEPT select * from A)