select table1.usercode from table1,table2 where
table1.usercode = table2.usercode(+)  and  table2.username is null

解决方案 »

  1.   

    select usercode from table1 where usercode not exists (select Usercode from table2) select t1.usercode from table1 t1,table2 t2 where t1.usercode<>t2.usercode
      

  2.   

    select usercode from table1 
    minus
    select Usercode from table2
      

  3.   

    select a.usercode from table1 a,table2 b where 
    a.usercode<>b.usercode
      

  4.   

    select t1.usercode from table1 t1,table2 t2 where t1.usercode<>t2.usercode
      

  5.   

    select usercode from table1 minus (select Usercode from table2)
      

  6.   

    select usercode from t1 where not exists (select 'X' from t2 where t1.usercode=t2.usercode)
      

  7.   

    minus 比 not in 的效率高吗??