The TIMESTAMP_TO_SCN
and SCN_TO_TIMESTAMP
functions have been added to SQL and PL/SQL to simplify flashback operations:
SELECT * FROM emp AS OF SCN TIMESTAMP_TO_SCN(SYSTIMESTAMP - 1/24);SELECT * FROM emp AS OF TIMESTAMP SCN_TO_TIMESTAMP(993240);DECLARE l_scn NUMBER; l_timestamp TIMESTAMP; BEGIN l_scn := TIMESTAMP_TO_SCN(SYSTIMESTAMP - 1/24); l_timestamp := SCN_TO_TIMESTAMP(l_scn); END; / |
Fonte: http://www.oracle-base.com/articles/10g/PlsqlEnhancements10g.php
Nenhum comentário :
Postar um comentário