1.
//恢复的时间点
exec dbms_flashback.enable_at_time(to_date('2012-07-02 20:15:00','yyyy-mm-dd hh24:mi:ss'));
//恢复数据set serveroutput on
DECLARE r_temp kgdata.dt_corrention_detail%ROWTYPE;
CURSOR c_temp IS SELECT * FROM kgdata.dt_corrention_detail;
BEGIN
OPEN c_temp;
dbms_flashback.disable;
LOOP
FETCH c_temp INTO r_temp;
EXIT WHEN c_temp%NOTFOUND;
insert into kgdata.dt_corrention_detail(FS_WEIGHTNO,FD_COMPATEDATE,FN_ALLOWDIFF,FN_WEIGHT,
FN_SHOWWEIGHT,FN_DIFFWEIGHT,fs_judgeresult,fs_operator,fs_shift,fs_term,fs_memo,fs_pointcode) values (
r_temp.FS_WEIGHTNO,r_temp.FD_COMPATEDATE,r_temp.FN_ALLOWDIFF,r_temp.FN_WEIGHT,
r_temp.FN_SHOWWEIGHT,r_temp.FN_DIFFWEIGHT,r_temp.fs_judgeresult,r_temp.fs_operator,r_temp.fs_shift,r_temp.fs_term,r_temp.fs_memo,r_temp.fs_pointcode
);
commit;
END LOOP;
CLOSE c_temp;
2.
insert into kgdata.dt_corrention_detail
select * from kgdata.dt_corrention_detail as of timestamp to_timestamp('2007-07-23 10:20:00', 'yyyy-mm-dd hh24:mi:ss');