读书人

Oracle 回滚表记要

发布时间: 2012-09-27 11:11:17 作者: rapoo

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)中

读书人网 >其他数据库

热点推荐