a   b    c   
1   2    3
2   3    4
5   8    5
8   7    5
a   b    c
1   2    3
2   3    4要的到
a   b   c
5   8   5
8   7   5

解决方案 »

  1.   

    Select * from Table1 A 
    Where  Not Exists(Select * from Table2 Where a=A.a And b=A.b Andc=A.c)
      

  2.   

    Select * from Table1 A 
    Where  Not Exists(Select * from Table2 Where a+b+c=A.a+A.b+A.c)
      

  3.   

    declare @t table(a int,b int,c int)
    insert into @t select 1 ,2 ,3
    union all select 2 ,3 ,4
    union all select 5 ,8 ,5
    union all select 8 ,7 ,5declare @a table(a int,b int,c int)
    insert into @a select 1 ,2 ,3
    union all select 2 ,3 ,4select * from @t a where not exists(select 1 from @a where a=a.a and b=a.b and c=a.c)
      

  4.   

    a   b    c   
    1   21   3
    2   3    4
    5   8    5
    8   7    5
    a   b    c
    1   2    13
    2   3    4
    假如是這樣的數據,a+b+c=A.a+A.b+A.c這樣就有問題了。