1. 誤刪了Table資料並且也已經commit

確認目前資料

image

2.時間

SQL> select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;

image

3.SCN

SQL> select to_char(current_scn,'99999999990') from v$database;

image

4. 刪除資料表

SQL> delete BOOKS;

SQL> commit;

image

 

5. Flashback Query查詢

SQL> select * from BOOKS as of scn 1021992;

image

6. 把資料重寫回去

SQL> insert into BOOKS select * from BOOKS as of scn 1021992;

SQL> commit;

image

7. 確認資料

SQL> select * from BOOKS;

image