Intersect是在Analysis Services里面用的,不好意思我没有学过Oracle,所以可能没有理解你的意思据一个小例子:create table t1 (i int)
create table t2 (j int)insert t1 values (1)
insert t1 values (3)
insert t1 values (4)insert t2 values (1)
insert t2 values (5)
insert t2 values (7)
insert t2 values (3)select * from t1 where t1.i IN (select * from t2)

解决方案 »

  1.   

    --你可以看看下面的意思:
    SELECT U.字段列表 FROM
    (SELECT DISTINCT TABLE1.字段列表
     UNION ALL
     SELECT DISTINCT TABLE2.字段列表 
    )
    GROUP BY U.字段列表
    HAVING COUNT(*)>1
    --两表要有兼容性啊
      

  2.   

    --修改一下
    --你可以看看下面的意思:
    SELECT U.字段列表 FROM
    (SELECT DISTINCT TABLE1.字段列表
     UNION ALL
     SELECT DISTINCT TABLE2.字段列表 
    ) U 
    GROUP BY U.字段列表
    HAVING COUNT(*)>1
    --两表要有兼容性啊
      

  3.   

    求交集可以用exists的.
    select * from (
    select 1994 as ye union all
    select 1995 union all
    select 1996
    ) a where exists 
    (
    select 1 from 
    (
    select 1995 as ye union all
    select 1996 union all
    select 1997
    ) b where a.ye=b.ye
    )