前言:
我们在开发时大部分人都需要一些数据用来测试,而某些时候,由于系统逻辑较为复杂,数据能出现在我们需要的界面上,需要很多特定的条件,当我们辛辛苦苦开发完,还要含着泪测试的时候,难道还要为数据用完了还得再造而发愁吗?
不!!!
下面有两种方式恢复数据
select * from 表 as of timestamp to_timestamp('2018-12-05 15:27:00','yyyy-mm-dd hh24:mi:ss')
insert into 表 (select * from bzk_xs_jbxx as of timestamp to_timestamp('2018-12-05 15:28:00','yyyy-mm-dd hh24:mi:ss'));注意要保证主键不重复。
推荐下面这个方法:比较简单,不用考虑主键是否重复,因为造的数据也有自己的不足之处
alter table 表 enable row movement
flashback table 表 to timestamp to_timestamp('2018-12-05 15:27:00','yyyy-mm-dd hh24:mi:ss')
alter table 表disable row movement