select identity(int,1,1) id,* into #a from a
select identity(int,1,1) id,* into #b from b
select * from (
select (select count(*) from #a where [money]=tem.[money] and id<=tem.id) id,[money] from #a tem) a
where not exists (select 1 from (
select (select count(*) from #a where [money]=tem.[money] and id<=tem.id) id,[money] from #a tem) b
where a.id=b.id and a.[money]=b.[money])
Select * From A Where Money In
(Select money from
(select money,count(*) cnt from A group by money) a,
(select money,count(*) cnt from B group by money) b
Where a.money=b.money and a.cnt!=b.cnt
)