日期:2014-05-16  浏览次数:20467 次

Oracle 回滚表记录

1、create table mgt_data_dict_temp as select * from mgt_data_dict_ele where rownum < 1 ;

2、insert into mgt_data_dict_temp  select * from mgt_data_dict_ele as of timestamp 

  to_timestamp('2012-09-21 16:45:00', 'yyyy-mm-dd hh24:mi:ss');

 

操作步骤

1、创建一个临时表(mgt_data_dict_temp),表结构和mgt_data_dict_ele相同,不需要记录 (rownum < 1)

2、回滚表mgt_data_dict_ele里的记录,时间点为'2012-09-21 16:45:00',该时间点后的数据将不会被查询出来,

     回滚后的记录被插入到临时表(mgt_data_dict_temp)中