Oracle数据库有时候不小心删除掉数据,想查询这些数据,或者恢复数据,就可以使用带有as of子句的select语句进行闪回查询。

闪回查询过去某个时间段的数据

select * from tb
as of timestamp to_timestamp('2017-11-07 08:50:00', 'yyyy-mm-dd hh:mi:ss')
where code = '001';

闪回恢复

insert into tb(
select * from tb
as of timestamp to_timestamp('2017-11-07 08:50:00', 'yyyy-mm-dd hh:mi:ss')
where code = '001'
);

相关文章:

  • 2022-01-26
  • 2021-06-26
  • 2021-05-27
  • 2021-08-14
  • 2021-06-08
  • 2021-06-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-04-19
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2021-08-23
相关资源
相似解决方案