let us we discuss about flashback version query & flashback transaction query what is flashback version query ? -flashback version query is allows the versions of a specific row to be tracked during a specified time period using the VERSIONS BETWEEN clause s-1 startup the db and  logged in sysdba and open another session connect  as scott user and see the actual table of ram

SQL> select * from ram;

     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
      7369 SMITH      CLERK           7902 17-DEC-80        800                   20
      7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300        30
      7521 WARD       SALESMAN        7698 22-FEB-81       1250        500        30
      7566 JONES      MANAGER         7839 02-APR-81       2975                   20
      7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400        30
      7698 BLAKE      MANAGER         7839 01-MAY-81       2850                   30
      7782 CLARK      MANAGER         7839 09-JUN-81       2450                   10
      7788 SCOTT      ANALYST         7566 19-APR-87       3000                   20
      7839 KING       PRESIDENT            17-NOV-81       5000                   10
      7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0        30
      7876 ADAMS      CLERK           7788 23-MAY-87       1100                   20
      7900 JAMES      CLERK           7698 03-DEC-81        950                   30
      7902 FORD       ANALYST         7566 03-DEC-81       3000                   20
      7934 MILLER     CLERK           7782 23-JAN-82       1300                   10

14 rows selected.

s-2: going to update sal column of empno=7900

SQL> update ram set sal=sal+5000 where empno=7900;

1 row updated.

SQL> commit;

Commit complete.




SQL> update ram set sal=sal-870 where empno=7900;

1 row updated.

SQL> commit;

Commit complete.



SQL> update ram set ename='YUVI' where empno=7900;

1 row updated.

SQL> commit;

Commit complete.

s-3 go to log on sysdba we can able to see what are the transactions happen during the  particular time periods in that table  

SQL> COLUMN versions_startscn FORMAT 99999999999999999
COLUMN versions_starttime FORMAT A24
COLUMN versions_endtime FORMAT A24
COLUMN versions_xid FORMAT A16
COLUMN versions_operation FORMAT A1
COLUMN description FORMAT A11
SET LINESIZE 200

SELECT versions_startscn, versions_starttime, 
       versions_endtime,
       versions_xid, versions_operation,
       empno,ename,sal  
FROM   scott.ram
       VERSIONS BETWEEN TIMESTAMP TO_TIMESTAMP('2016-03-13 17:27:00', 'YYYY-MM-DD HH24:MI:SS')
AND TO_TIMESTAMP('2016-03-13 17:29:52', 'YYYY-MM-DD HH24:MI:SS');


VERSIONS_STARTSCN VERSIONS_STARTTIME       VERSIONS_ENDTIME         VERSIONS_XID     V      EMPNO ENAME             SAL
------------------ ------------------------ ------------------------ ---------------- - ---------- ---------- ----------
            873151 13-MAR-16 05.29.33 PM                             06000C00BA020000 U       7900 YUVI             5080
            873108 13-MAR-16 05.28.28 PM    13-MAR-16 05.29.33 PM    04001E0022020000 U       7900 JAMES            5080
            873090 13-MAR-16 05.27.29 PM    13-MAR-16 05.28.28 PM    03001B00C6020000 U       7900 JAMES            5950
                                                                                     7369 SMITH      800
                                                                                     7499 ALLEN     1600
                                                                                     7521 WARD      1250
                                                                                     7566 JONES     2975
                                                                                     7654 MARTIN            1250
                                                                                     7698 BLAKE     2850
                                                                                     7782 CLARK     2450
                                                                                     7788 SCOTT     3000
                                                                                     7839 KING      5000
                                                                                     7844 TURNER            1500
                                                                                     7876 ADAMS     1100
                                            13-MAR-16 05.27.29 PM                    7900 JAMES      950
                                                                                     7902 FORD      3000
                                                                                     7934 MILLER            1300

17 rows selected.


 

SQL> COLUMN versions_startscn FORMAT 99999999999999999
COLUMN versions_starttime FORMAT A24
COLUMN versions_endtime FORMAT A24
COLUMN versions_xid FORMAT A16
COLUMN versions_operation FORMAT A1
COLUMN description FORMAT A11
SET LINESIZE 200

SELECT versions_startscn, versions_starttime, 
       versions_endtime,
       versions_xid, versions_operation,
       empno,ename,sal  
FROM   scott.ram
       VERSIONS BETWEEN TIMESTAMP TO_TIMESTAMP('2016-03-13 17:27:00', 'YYYY-MM-DD HH24:MI:SS')
AND TO_TIMESTAMP('2016-03-13 17:29:52', 'YYYY-MM-DD HH24:MI:SS');


VERSIONS_STARTSCN VERSIONS_STARTTIME       VERSIONS_ENDTIME         VERSIONS_XID     V      EMPNO ENAME             SAL
------------------ ------------------------ ------------------------ ---------------- - ---------- ---------- ----------
            873151 13-MAR-16 05.29.33 PM                             06000C00BA020000 U       7900 YUVI             5080
            873108 13-MAR-16 05.28.28 PM    13-MAR-16 05.29.33 PM    04001E0022020000 U       7900 JAMES            5080
            873090 13-MAR-16 05.27.29 PM    13-MAR-16 05.28.28 PM    03001B00C6020000 U       7900 JAMES            5950
                                                                                     7369 SMITH      800
                                                                                     7499 ALLEN     1600
                                                                                     7521 WARD      1250
                                                                                     7566 JONES     2975
                                                                                     7654 MARTIN            1250
                                                                                     7698 BLAKE     2850
                                                                                     7782 CLARK     2450
                                                                                     7788 SCOTT     3000
                                                                                     7839 KING      5000
                                                                                     7844 TURNER            1500
                                                                                     7876 ADAMS     1100
                                            13-MAR-16 05.27.29 PM                    7900 JAMES      950
                                                                                     7902 FORD      3000
                                                                                     7934 MILLER            1300

17 rows selected.


  in above query  will  explain what are the transactions happen on that table and gives  the  original value also