select * 
from t1union select t1.* 
from t1 right outer join t2 on (t1.字段1 = t2.字段1)
where t1.字段1 is null

解决方案 »

  1.   

    另外要求不能用not in关键字
      

  2.   

    select t1.* from t1
    union
    select t2.* from t2 join t1 on t2.1<>t1.1
      

  3.   

    select * from t1
    union
    select * from t2 where t1.字段1<>t2.字段1
      

  4.   

    感谢楼上两位,但是结果不对,
    包含 UNION 运算符的 SQL 语句中的所有查询都必须在目标列表中具有相同数目的表达式。
      

  5.   

    呵呵~~~
    select * from T1
    union
    select t2.* from t2 left outer join t1 on t2.col1=t1.col1 
    where t1.col1 is null
      

  6.   

    哈哈~~~
    select col1,col2,col3 from T1
    union all
    select t2.col1,t2.col2,t2.col3 from t2 left outer join t1 on t2.col1=t1.col1 
    where t1.col1 is null