select tablea.* from tablea where not exists(select 1 from tableb@link_name t
where t.id=tablea.id);建立两个链路

解决方案 »

  1.   

    还有另一个问题就是怎么update 一个表中日期字段的数据是2003年的都修改成2005年,字段后面的月日都不变只改年。谢谢。
      

  2.   

    在A库中查,前提是你建了b的dblink
    select id from tablea not in (select id from tableb@b);
      

  3.   

    update tb set col_date=add_months(col_date,24)
    where to_char(col_date,'yyyy')='2003';
      

  4.   

    to:
    bzszp(SongZip) ( ) 
    数据并不是只有2003年的还有2002,2001的,我的意思是只要是小于2004的都改成2005年
      

  5.   

    update tb set col_date=to_date('2005'||to_char(col_date,'mmddhh24miss'),'yyyymmddhh24miss')
    where to_char(col_date,'yyyy')<'2004';
      

  6.   

    楼上的不好,这样会丢失毫秒等数据.
    最好还是:update tb set col_date=add_months(col_date,24) 
    where col_date>= to_date('2003','yyyy')
    and col_date<to_date('2004','yyyy')
    使用to_char会破坏索引