select * from A where not exists(select 1 from B where money=A.Money)

解决方案 »

  1.   

    ???
    select 1 ???是什么意思呀?
      

  2.   

    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
    )
      

  3.   

    select identity(int,1,1) id,* into #a from a
    select identity(int,1,1) id,* into #b from bselect * 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])drop table #a,#b