select * 
from Tb1 t1
where not exists(select * 
                   from Tb2 t2 
                  where t1.id=t2.id
                    and t1.name=t2.name
                    and t1.add=t2.add);

解决方案 »

  1.   

    select * 
    from Tb1 t1
    where not exists(select * 
                       from Tb2 t2 
                      where t1.id=t2.id
                        and t1.name=t2.name
                        and t1.add=t2.add)
      and not exists(select * 
                       from Tb3 t3 
                      where t1.id=t3.id
                        and t1.name=t3.name
                        and t1.add=t3.add)
    这样行不行啊?
      

  2.   

    select * from tb1 where not exists (select * from tb2 where tb1.id=tb2.id )
    union 
    select * from tb1 where not exists(select * from tb3 where tb1.id=tb3.id )