update提交后表数据恢复

一、全表恢复

1.创建恢复表
create table table_recover
as select * from table
as of timestamp to_timestamp('2019-03-18 15:30:30','yyyy-mm-dd hh24:mi:ss'); --时间为更改前的时间
2.删除原表
delete from table
3.向原表中插入恢复表的数据
insert into table select * from table_recover;

二、某天记录恢复

1.查询修改前某条记录的数据

select * from
(select * from bas_carinfo
as of timestamp to_timestamp('2019-04-16 10:30:00','yyyy-mm-dd hh24:mi:ss')) t
where t.carcardnumber = '川AW3991';

2.使用update语句修改回去。

posted @ 2019-03-20 17:44  AWNUygah  阅读(499)  评论(0编辑  收藏  举报