In Oracle 10g (and, I think, with 9i) you can use Flashback Query for this.
Usually, Flashback Query is used when you need to see data some time ago, but in your case, the trick is that Flashback Query only sees captured data.
So here is a quick example:
SQL> create table t1 as select level lev from dual connect by level < 100;
Table created.
SQL> select count(*) from t1;
COUNT(*)
----------
99
SQL> select count(*) from t1 as of timestamp systimestamp;
COUNT(*)
----------
99
SQL> update t1 set lev = -lev;
99 rows updated.
SQL> select max(lev) from t1 as of timestamp systimestamp;
MAX(LEV)
----------
99
SQL> select max(lev) from t1;
MAX(LEV)
----------
-1
SQL> commit;
Commit complete.
SQL> select max(lev) from t1 as of timestamp systimestamp;
MAX(LEV)
----------
-1
SQL>
UPD: Better yet, you can use the Flashback or Flashback Transaction Query version query with some tweaks to filter changes made by all sessions except the current session.
source
share