首页 > 数据库 > Oracle > scn timestamp
Scn_to_timestamp and Timestamp_to_scn
SQL> select current_scn,to_char(sysdate,'yyyy/mm/dd hh24:mi:ss') from v$database;
CURRENT_SCN TO_CHAR(SYSDATE,'YY
----------- -------------------
12529246 2012/06/18 13:14:19
SQL> select scn_to_timestamp(12529246) from dual;
SCN_TO_TIMESTAMP(12529246)
---------------------------------------------------------------------------
18-JUN-12
SQL> select systimestamp from dual;
SYSTIMESTAMP
---------------------------------------------------------------------------
18-JUN-12
SQL> select timestamp_to_scn(to_timestamp('18-JUN-12
TIMESTAMP_TO_SCN(TO_TIMESTAMP('18-JUN-1201.16.01.146523PM'))
------------------------------------------------------------
12529314
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24237320/viewspace-1058571/ ,如需转载,请注明出处,否则将追究法律责任。