数据误删除怎么恢复
SQL操作
select * from 表名 as of timestamp to_timestamp('删除时间点','yyyy-mm-dd hh24:mi:ss');
例如:
select * from student as of timestamp to_timestamp('20210412','yyyy-mm-dd hh24:mi:ss');
select * from student as of timestamp to_timestamp('20210412','yyyy-mm-dd hh24:mi:ss') where id = 1;
insert into 表名 ( select * from 表名
as of timestamp to_timestamp('删除时间点','yyyy-mm-dd hh24:mi:ss' )
);
例如:
insert into student ( select * from student
as of timestamp to_timestamp('20210412','yyyy-mm-dd hh24:mi:ss' )
);
insert into student ( select * from student
as of timestamp to_timestamp('20210412','yyyy-mm-dd hh24:mi:ss' )
) where id = 1;
网友评论