日期:2014-05-19  浏览次数:20404 次

一个简单问题
select   *   from   t1   where   not   exists(select   1   from   t2   where   字段 <> t1.字段)
我想问一下这个语句是找到相同的记录还是不相同的啊

------解决方案--------------------
通常情况结果为空,除非t2只有1条记录或者t2中【字段】的值只有1中
------解决方案--------------------
--找不相同的记录
select * from t1 where not exists(select 1 from t2 where 字段=t1.字段)