ITPub博客

首页 > Linux操作系统 > Linux操作系统 > scn and timestamp

scn and timestamp

原创 Linux操作系统 作者:tolilong 时间:2012-06-18 13:22:14 0 删除 编辑
Normal 0 0 2 false false false MicrosoftInternetExplorer4           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

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

上一篇: dataguard(rac)
请登录后发表评论 登录
全部评论

注册时间:2010-07-13

  • 博文量
    406
  • 访问量
    959394