Sunday, April 13, 2008

Using Flashback Table

The Flashback Table must have ROW MOVEMENT enabled with the following
command: ALTER TABLE tablename ENABLE ROW MOVEMENT.

SQL> alter table hr.t1 enable row movement;

Table altered.

SQL> select * from hr.t1;

F1
----------
50

SQL> select current_scn from v$database;

CURRENT_SCN
-----------
1175441

SQL> update hr.t1 set f1=5000;

1 row updated.

SQL> commit;

Commit complete.

SQL> flashback table hr.t1 to scn 1175441;

Flashback complete.

SQL> select * from hr.t1;

F1
----------
50