SQL> set time on
22:12:25 SQL>
22:12:25 SQL> select * from test1;
no rows selected
插入一条数据,提交并插叙此时的数据,22:19:50 SQL> insert into test1 values(10,'ACCOUNTING','NEW YORK');
1 row created.
22:19:55 SQL> commit;
Commit complete.
22:20:01 SQL> select * from test1;
DEPTNO DNAME LOC
---------- -------------- -------------
10 ACCOUNTING NEW YORK
再插入一条数据,提交并查询此时的数据,
22:20:21 SQL> insert into test1 values(20,'RESEARCH','DALLAS');
1 row created.
22:20:37 SQL> commit;
Commit complete.
22:20:45 SQL> select * from test1;
DEPTNO DNAME LOC
---------- -------------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
此时,发现插入数据错误,只想插入上述的第一条数据,这时马上闪回,
22:20:56 SQL> flashback table test1 to timestamp
22:28:33 2 to_timestamp('2016-09-29 22:20:37','yyyy-mm-dd hh24:mi:ss');
flashback table test1 to timestamp
*
ERROR at line 1:
ORA-08189: cannot flashback the table because row movement is not enabled
此时发现报错。22:31:09 SQL> flashback table test1 to timestamp
22:31:23 2 to_timestamp('2016-09-29 22:20:37','yyyy-mm-dd hh24:mi:ss');
Flashback complete.
22:31:40 SQL> select * from test1;
DEPTNO DNAME LOC
---------- -------------- -------------
10 ACCOUNTING NEW YORK
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31392094/viewspace-2125774/ ,如需转载,请注明出处,否则将追究法律责任。