一张表 A,里面有些数据B
现在我有数据C,但是没有对应的表
 我想找找C中有的,而表A数据B没有的, B中的数据肯定全在C中

解决方案 »

  1.   

    select * from C
    minus
    select * from A或者用exists关键字
      

  2.   

    也可以用外连接:
    SELECT C.* FROM C,A WHERE C.fk=A.fk(+) AND A.fk IS NULL;楼主说的没有对应表不清楚什么意思?如果是文件,可以用外部表来做查询
      

  3.   

    select * from 数据C所在的表
    minus
    select * from A
      

  4.   

    你再建一个同表A一致的表,表C,将数据导进去。再同上述说的一样,用语句select出来好了即select * from C
    minus
    select * from A
    。如果你有工具的话,直接对比表数据也可以的。
      

  5.   


    创建C
    create table c as select * from A where 1=2;
      

  6.   

    existscreate table c select * from table
      

  7.   

    select * from a where a.kk not in (select kk from C)?