1.查詢數據庫當前時間(目的是爲了檢查數據庫時間是否與你電腦時間相近,避免時間不同而將數據恢復到錯誤時間點)
select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;
2、查詢刪除數據時間點之前的數據(eg:我想恢復11點之前的數據)
select * from 表名 as of timestamp to_timestamp('2019-11-20 11:00:00','yyyy-mm-dd hh24:mi:ss');
3.開啓用行移動功能
alter table 表名 enable row movement;
4.恢復數據
flashback table 表名 to timestamp to_timestamp('2019-11-20 11:00:00','yyyy-mm-dd hh24:mi:ss');
5.測試
select * from 表名;