SQL codeSQL> select * from t;
ACCOUNT STAT
---------- ----
3 欠费
4 欠费
SQL> select to_char(sysdate, 'yyyy-mm-dd hh24:mi:ss') from dual;
TO_CHAR(SYSDATE,'YY
-------------------
2009-01-04 22:21:11
SQL> insert into t values(12, 'test');
已创建 1 行。
SQL> commit;
提交完成。
SQL> select * from t;
ACCOUNT STAT
---------- ----
12 test
3 欠费
4 欠费
SQL> flashback table t to timestamp '2009-1-4 22:21:11';
flashback table t to timestamp '2009-1-4 22:21:11'
*
第 1 行出现错误:
[color=#FF0000][b]ORA-08189: 因为未启用行移动功能, 不能闪回表[/b][/color]
SQL> [color=#FF0000]alter table t enable row movement;[/color]
表已更改。
SQL> flashback table t to timestamp to_timestamp('2009-1-4 22:21:11', 'yyyy-mm-
dd hh24:mi:ss');
闪回完成。
SQL> select * from t;
ACCOUNT STAT
---------- ----
3 欠费
4 欠费
SQL>