oracle 闪回查询实战

来源:互联网 发布:什么是数据可视化 编辑:程序博客网 时间:2024/05/16 17:03


declare
record_test test%rowtype;
cursor test_old is select * from test;
begin
--启用该时刻的数据
dbms_flashback.enable_at_time(to_timestamp('2007-08-14 12:17:21', 'YYYY-MM-DD HH12:MI:SS'));
--取出闪回数据
open test_old;
loop
   fetch test_old into record_test;
   exit when test_old%notfound;
   dbms_output.put_line('insert one find...');
end loop;
close test_old;
--禁用闪回查询
dbms_flashback.disable();
end;


好像truncate掉的数据不能闪回查询伽。。
原创粉丝点击