先说说minus是干什么用的好吗 ?

解决方案 »

  1.   

    minus是实现两个集合的减操作
      

  2.   

    sql server中没有这个操作!!自己用SQL语句实现吧!!!
    ORACLE中的有些操作在SQL中是没有的!!
      

  3.   

    你要的是差:
    c1-c2:select * from t1 where not exists(select 1 from t2 where t1.c1=t2.c1 and t1.c2=t2.c2)c2-c1:select * from t2 where not exists(select 1 from t1 where t1.c1=t2.c1 and t1.c2=t2.c2)
      

  4.   

    试试用NOT IN 或NOT EXISTS来实现这样的功能.
      

  5.   

    对啊。你先解释一下MINUS的含义,然后就好办了。
      

  6.   

    我上回也问过大力,这样应该可以满足,呵呵。
    大力辛苦了。
    c1-c2:select * from t1 where not exists(select 1 from t2 where t1.c1=t2.c1 and t1.c2=t2.c2)c2-c1:select * from t2 where not exists(select 1 from t1 where t1.c1=t2.c1 and t1.c2=t2.c2)