oracle 10g中scn和timestamp相互轉換

wang_0720發表於2013-11-06
獲取系統當前的scn值
SYS>select dbms_flashback.get_system_change_number from dual;

GET_SYSTEM_CHANGE_NUMBER
------------------------
 
        1393146
scn to timestamp
SYS>select dbms_flashback.get_system_change_number scn,SCN_TO_TIMESTAMP(dbms_flashback.get_system_change_number) time from dual;

       SCN TIME
---------- ---------------------------------------------------------------------------
   1392412 24-MAY-13 12.12.44.000000000 PM
timestamp to scn
SYS>select timestamp_to_scn(SYSTIMESTAMP) scn from dual;

       SCN
----------
   1392500

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27181165/viewspace-775868/,如需轉載,請註明出處,否則將追究法律責任。

相關文章