列出TableA中有的而TableB中没有, 以及B中有而A中没有的记录: 其中两个表的结构相同,选择的Key可以多个 Select Key from ( select * from TableA Union select * from TableB ) group by Key having count(Key)=1 列出TableA中有的而TableB中没有的记录: Select Key from ( (select * from TableA Union all select * from TableB) Union select * from TableB )a group by Key having count(Key)=1