个人技术分享

查询回滚数据

select * from tablename AS OF TIMESTAMP  TO_TIMESTAMP('2023-12-29 10:29:00','yyyy-mm-dd hh24:mi:ss') 
where not exists (select 1 from tablename A where A.xh = tablename.xh and A.TIME = tablename.TIME);

TO_TIMESTAMP('2023-12-29 10:29:00','yyyy-mm-dd hh24:mi:ss') 是指定某天的时间

select * from tablename AS OF TIMESTAMP (SYSTIMESTAMP - INTERVAL '10' MINUTE)是往前倒十分钟

数据回滚

alter table tablename enable row movement;

flashback table tablename to TIMESTAMP (SYSTIMESTAMP - INTERVAL '30' MINUTE);