ITPub博客

首页 > 数据库 > Oracle > scn timestamp

scn timestamp

原创 Oracle 作者:tolilong 时间:2012-06-18 13:20:08 0 删除 编辑

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 01.14.18.000000000 PM

SQL> select systimestamp from dual;

SYSTIMESTAMP

---------------------------------------------------------------------------

18-JUN-12 01.16.01.146523 PM +08:00

SQL> select timestamp_to_scn(to_timestamp('18-JUN-12 01.16.01.146523 PM')) from dual;

TIMESTAMP_TO_SCN(TO_TIMESTAMP('18-JUN-1201.16.01.146523PM'))

------------------------------------------------------------

12529314

[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24237320/viewspace-1058571/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: flashback使用(4)
请登录后发表评论 登录
全部评论

注册时间:2010-07-13

  • 博文量
    406
  • 访问量
    1208675