查询两个表不同的数据
select * from B where (select count(1) from A where A.ID = B.ID) = 0
查询两个表相同的数据可以用union all
select * from a
union all
select * from b
查询两个表不同的数据
select * from B where (select count(1) from A where A.ID = B.ID) = 0
查询两个表相同的数据可以用union all
select * from a
union all
select * from b