lundi 9 janvier 2012

Effectuer un FLASHBACK VERSION QUERY

Rappel :
Le FLASHBACK VERSION QUERY nous permet de voir toutes les versions d’une ligne sur un certain intervalle de temps.

Syntaxe du FLASHBACK VERSION QUERY :
Nom_de_la_table VERSIONS BETWEEN {TIMESTAMP | SCN} {expression 1 | MINVALUE} AND {expression2 | MAXVALUE}

Les colonnes disponibles sont :


Exemple d’interrogation du FLASHBACK VERSION QUERY sur la table ‘DEPT’ :
SQL> SELECT VERSIONS_STARTTIME, VERSIONS_ENDTIME, VERSIONS_OPERATION,
DEPTNO, DNAME, LOC

FROM DEPT

VERSIONS BETWEEN SCN MINVALUE AND MAXVALUE

WHERE DEPTNO=10

ORDER BY VERSIONS_STARTSCN ;

Aucun commentaire:

Enregistrer un commentaire