有时候手贱,数据删错了,想要恢复,却没有闪回,没搞备份,这种小数据量、短时间间隔的就可以恢复到指定时间的数据。
- 脚本如下
delete from 表名;
insert into 表名 select *
from 表名 as of timestamp to_timestamp('2021-03-26 8:00:00', 'yyyy-mm-dd hh24:mi:ss');
有时候手贱,数据删错了,想要恢复,却没有闪回,没搞备份,这种小数据量、短时间间隔的就可以恢复到指定时间的数据。
delete from 表名;
insert into 表名 select *
from 表名 as of timestamp to_timestamp('2021-03-26 8:00:00', 'yyyy-mm-dd hh24:mi:ss');