small-panda

1. select * from emps as of timestamp to_Date(\'2015-12-11 14:00:00\',\'yyyy-mm-dd hh24:mi:ss\'),SQL语句是查询某一时间点上的表中的所有数据,可用于恢复误删(全部误删)的数据

2.恢复误删数据(全部误删)

insert inot emps  select * from emps as of timestamp to_Date(\'2015-12-11 14:00:00\',\'yyyy-mm-dd hh24:mi:ss\')

3.恢复部分误删数据:

insert into emp   (select * from emps  as of timestamp to_Date(\'2015-12-11 14:00:00\',\'yyyy-mm-dd hh24:mi:ss\')  where emp_id not in (select emp_id from emps))

只插入误删的数据,将表中存在的数据过滤掉

分类:

技术点:

相关文章: