select FieldA from table1 where FieldA not in(select FieldB from table2 ) union all select FieldB from table2 where FieldB not in(select FieldA from table1 )
select FieldA from TableA a where not exists(select 1 from TableB where FieldB=a.FieldA) union select FieldB from TableB b where not exists(select 1 from TableA where FieldA=b.FieldB)
select a.* from 表A A left join 表B B on A.FieldA=B.FieldB and B.FieldB is null
select a.fielda,b.fieldb from table1 as a left join table2 as b where a.fielda<>b.fieldb
select * from table1 where not exists (select * from table2 where table1.fielda=table2.fieldb)
select FieldA from table1 where A.FieldA<>B.FieldAunion allselect FieldB from table2 where A.FieldA<>B.FieldA
select * from a where FieldA not in (select FieldB from b)
union all
select FieldB from table2 where FieldB not in(select FieldA from table1 )
union
select FieldB from TableB b where not exists(select 1 from TableA where FieldA=b.FieldB)
where FieldA not in
(select FieldB from b)