1、查询最近一段时间的数据
tablename 不能带别名,否则报错:“SQL命令未正确结束”
select *
from tablename as of timestamp to_timestamp('2020-11-18 11:00:00','yyyy-mm-dd hh24:mi:ss')
where colunm='aa';
2、恢复最近一段时间的数据
delete from tablename where colunm='aa';
insert into tablename select *
from tablename as of timestamp to_timestamp('2020-11-18 11:00:00','yyyy-mm-dd hh24:mi:ss')
where colunm='aa';--恢复到过去某一时刻
insert into tablename select *
from tablename as of TIMESTAMP SYSDATE-5/1440
where colunm='aa';--恢复到某一时间段的数据