本帖最后由 hadis1230 于 2012-02-23 15:36:55 编辑

解决方案 »

  1.   

    貌似就是你这么写.
    select * from lsb where not exists (select * from xyzb where xyzb.税号=lsb.税号 and xyzb.软件=lsb.软件)或者:select distinct * from lsb where not exists (select * from xyzb where xyzb.税号=lsb.税号 and xyzb.软件=lsb.软件)
      

  2.   

    但是我的语句貌似只筛选出B表中不存在于A表的记录吧? 但是本身B表中可能会有几条是一样的记录的  现在的问题就是想从筛选后的记录中去掉重复的
      

  3.   

    呵呵 貌似是这个语句就可以了 
    select distinct 税号 from lsb where not exists (select * from xyzb where xyzb.税号=lsb.税号 and xyzb.软件=lsb.软件)