1. 程式人生 > >Oracle資料庫回滾

Oracle資料庫回滾

轉自"https://blog.csdn.net/dan521chuang/article/details/78431912"
1、 – 查詢你執行update 語句之前的資料 精確到什麼時間

select * from 表名 as of timestamp to_timestamp('2017-07-21 17:16:38', 'yyyy-mm-dd hh24:mi:ss');

2、 – 開啟可移動資料命令,執行完就可以回滾資料

alter table 表名 enable row movement;

3、 --正式回滾 update 語句前的資料

  flashback table 表名 to timestamp TO_TIMESTAMP('2017-07-21 17:16:38', 'yyyy-mm-dd hh24:mi:ss');