select * from 表1 where 主键 not in (select 主键 from 表2)
union
select * from 表2 where 主键 not in (select 主键 from 表1)