现在有两张表 都存的是手机号码 且都只有一个字段
要把 第一张表 不包含 第二张表中 记录的 记录 取出来
那位老大知道怎么做请把 完整的 语句 贴出来 谢谢 !!在线等.

解决方案 »

  1.   

    select * from T1 where 列 not in (select 列 from T2)
    不是这样的吗?
      

  2.   

    select * from table1
    where not exists (
    select 1 from table2
    where 手机号码=table1.手机号码
    )
      

  3.   

    select 字段1 from 表1  where 字段1 not in (
    select 字段2 from 表2)
      

  4.   

    select a.号码
    from tableA a left join tableB b on a.号码=b.号码
    where b.号码 is null