-- oracle闪回 flashback
1、delete
create table flash_table_del(id int,name varchar2(32));
select * from flash_table_del t;
insert into flash_table_del values(1,'aaa');
insert into flash_table_del values(2,'bbb');
insert into flash_table_del values(3,'ccc');
select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;
delete from flash_table_del t where t.id=3;
commit;
-- 开启表的移动行功能
alter table flash_table_del enable row movement;
-- 按时间戳闪回
flashback table flash_table_del to timestamp to_timestamp('2013-06-13 15:56:28','yyyy-mm-dd hh24:mi:ss');
-- 按scn号闪回
select timestamp_to_scn(to_date('2013-06-13 15:56:28','yyyy-mm-dd hh24:mi:ss')) from dual ; -- 10393080
flashback table flash_table_del to scn 10393080;
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12961536/viewspace-769565/
,如需转载,请注明出处,否则将追究法律责任。