---如果delete錯了,通過以下方法可以找回數據
select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;
select * from tableA as of timestamp to_timestamp('2020-09-23 21:25:00','yyyy-mm-dd hh24:mi:ss');
create table tableA _temp as select * from tableA as of timestamp to_timestamp('2020-09-23 21:20:00','yyyy-mm-dd hh24:mi:ss');
就可以將那個時間點的數據都找到,於是比對出錯刪的數據。
如果直接想要恢復
flashback table 表名 to timestamp to_timestamp('2016-08-11 16:12:11','yyyy-mm-dd hh24:mi:ss');
但是也可能會出現問題,比如報錯:ORA-08189:未啓用行移動功能,不能閃回表;
alter table 表名 enable row movement; 即可