oracle表回滚到一个指定时间的操作语句 oracle 误删除数据恢复

今天在oracle不小心删除了一条重要的数据,记录一下如何回滚,恢复某一个表的数据
先查询数据,然后进行操作

select * from emp;
delete from emp where deptno='20'

-- 1. 添加恢复功能。

alter table emp enable row movement;

-- 2. 查看恢复记录

select * from emp as of timestamp to_timestamp('2020-06-17 00:40:00','yyyy-MM-dd hh24:mi:ss')

-- 3.恢复数据

flashback table emp to timestamp to_timestamp('2020-06-17 00:40:00','yyyy-MM-dd hh24:mi:ss')
posted @ 2020-06-17 14:14  Libbo-yu  阅读(724)  评论(0编辑  收藏  举报