首页 > 其他 > 详细

【练习】闪回表

时间:2016-12-11 15:06:42      阅读:169      评论:0      收藏:0      [点我收藏+]

1.删除表dept1:

13:09:30 SCOTT@ORA11GR2>select * from dept1;

    DEPTNO DNAME          LOC
---------- -------------- -------------
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON
        50 xxx            xxxx

13:09:47 SCOTT@ORA11GR2>delete from dept1;

4 rows deleted.

13:12:51 SCOTT@ORA11GR2>commit;

Commit complete.

2.允许行移动(使用flashback table 必须先允许行移动)

13:12:56 SCOTT@ORA11GR2>alter table dept1 enable row movement;

Table altered.

3.闪回表:

13:13:19 SCOTT@ORA11GR2>flashback table dept1 to timestamp to_timestamp(2016-11-11 13:09:47,yyyy-mm-dd hh24:mi:ss);

Flashback complete.

13:15:28 SCOTT@ORA11GR2>select * from dept1;

    DEPTNO DNAME          LOC
---------- -------------- -------------
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON
        50 xxx            xxxx

 

【练习】闪回表

原文:http://www.cnblogs.com/tomatoes-/p/6159440.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!