本帖最后由 wuzhentian 于 2011-12-13 11:37:21 编辑

解决方案 »

  1.   

     select * from A where A.号码 not in ( select 号码 from B ) 
      

  2.   

    select * from r_c_e_h_20111207 t where not exists 
    (select 1 from d_areacfg t1 where t.telno = t1.telno)
      

  3.   

    号码就是你数据库里表中存号码的字段名
    比如表名是tablea,字段名是telno,那么就写成是tablea.telno
      

  4.   

    A和B就是你要查的表或视图的名字
    因为这两个表中都有号码字段,所以用A.号码和B.号码区别是那个表(视图)中的字段
      

  5.   

    select * from r_c_e_h_20111207 where t.call_type=‘1’  and cell_number not in
    (select t.cell_number 
    from 
    d_areacfg d 
    )2楼正解~~ 楼主描述可以再清晰一点, a 和 b 都是你的视图
      

  6.   

    select * from r_c_e_h_20111207 t where not exists 
    (select 1 from d_areacfg t1 where t.telno = t1.telno)