Oracle 11g 053 使用 闪回技术

SQL> select * from dept;

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON

SQL> insert into dept values(60,'bbbb','ccccc');

1 row created.

SQL> select * from dept;

    DEPTNO DNAME          LOC
---------- -------------- -------------
        60 bbbb           ccccc
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON

SQL> select to_char(sysdate,'yyyy/mm/dd hh24:mi:ss') from dual;

TO_CHAR(SYSDATE,'YY
-------------------
2019/10/24 06:50:45

SQL> select dbms_flashback.get_system_change_number from dual;

GET_SYSTEM_CHANGE_NUMBER
------------------------
                 1261990


SQL> select * from dept as of scn 1261980;

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON

SQL> 
SQL> 
SQL> 
SQL> select * from dept as of timestamp(to_date('2019/10/24 06:50:45','yyyy/mm/dd hh24:mi:ss'));

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON

SQL> 

发布了39 篇原创文章 · 获赞 4 · 访问量 3464

猜你喜欢

转载自blog.csdn.net/u011868279/article/details/102714701
今日推荐