如果只计算一个字段还好办:
select a.*,b.* from a left join b on a.column1=b.column1 where b.column1 is null

解决方案 »

  1.   

    這樣做不行,b.column1 is null是不作用的,我自己用兩個右連接做到,但那樣的速度,呵呵,不知道是否比not in 快
      

  2.   

    select a.*,b.* from a left join b on a.column1=b.column1 where len(b.column1)>0
      

  3.   

    select a.*,b.* from a left join b on a.column1=b.column1 where len(b.column1)=0
      

  4.   

    select a.*,b.* from a left join b on a.column1=b.column1 where len(b.column1)=0
      

  5.   

    select a.*,b.* from a left join b on a.column1=b.column1 where len(b.column1)=0
      

  6.   

    select a.*
    from a,b
    where a.column1<>b.column1 and a.column2<>b.column2
      

  7.   

    select a.*,b.* from a left join  b on a.field=b.field where b.field IS NULL
      

  8.   

    IS NULL 应该有效吧,我试了可以的
    select a.*,b.* from tableA a left join tableB b on a.column1=b.column1 where cast(b.column1 as varchar(20))+cast(b.column2 as varchar(20)) is null
      

  9.   

    select column1,column2
    from a
    group by column1,column2
    having 
    (select count(*) from b where b.column1 = .column1 and b.column2 = a.column2)=0有问题就说
      

  10.   

    zhiwen_huang(黄志文) 的方法可以,其他人都不可以,zhiwen_huang(黄志文) 的方法在oracle中是不可以的
      

  11.   

    select b.columnl1,b.columnl1 from b left join a on b.column1<>a.column1 where a.column1 is null