用DATA字段的值与系统时间比较不就可以了

解决方案 »

  1.   

    用存储过程实现导入导出比较困难,还是手工做吧。
    以下是提供一种参考方法:
    create or replace procedure
    as
    str varchar2(100);
    begin
    str:='create table b as select * from a where 一年以外';
    execute immediate str;
    delete from a where 一年以外;
    end;
    /
      

  2.   

    这么写:
    create or replace procedure Del_Data()
    as
     v_sql string(500);begin
     v_sql='delete from your_table where to_char(add_months(data,12),''yyyy'')=to_char(sysdate,''yyyy'')';
     execute immediate v_sql;
    end Del_Data;