怎样找出一个表中的某个字段<>另一个表中的某个字段的记录 各位大哥,救命啊

解决方案 »

  1.   

    select * from t1 where not exists(select 1 from t2 where 字段<>t1.字段)
      

  2.   

    select t1.* from t1 , t2 where t1.字段<>t2.字段
      

  3.   

    select distinct a.* from table1 a,table2,b where a.col<> b.col
      

  4.   

    select * from t1 where 字段 not in (select 字段 from t2 )
      

  5.   

    --tryselect A.* from A
    left join B on A.id=B.id
    where B.id is null
      

  6.   

    select * from t1 where 字段1 not in (select 字段2 from t2)
      

  7.   

    select * from t1 where not exists(select 1 from t2 where 字段<>t1.字段)