SQL2005用except/intersect比较比较存在重复select a from table1 where b in (select b from table2 ) intersectselect a from table1 where b in (select b from table3)orselectafrom table1where b in(select b from(select distinct b from table2 union all select distinct b from table3)t group by b having count(*)>1)...
----a在两个查询都存在用下面的select a from (select a from table1 where b in (select b from table2)) c, (select a from table1 where b in (select b from table3)) d where c.a=d.a---...