数据被delete删除:
delete from person where name='lisi';
数据恢复方法:
1.时间戳:
insert into person(select * from person as of timestamp to_timestamp('2019.01.01 01:01:01','yyyy.mm.dd hh24:mi:ss') where name='lisi');
注意:表中的主键不能冲突。
2. 表闪回:
(1)开启行移动:
alter table person enable row movement;
(2)恢复表数据:
flashback table person to timestamp to_timestamp('2019.01.01 01:01:01','yyyy.mm.dd hh24:mi:ss');
(3)关闭行移动:
alter table person disable row movement;
注意:表闪回用户必须有flash any table权限。