ITPub博客

首页 > 数据库 > Oracle > timestamp_to_scn&&scn_to_timestamp

timestamp_to_scn&&scn_to_timestamp

原创 Oracle 作者:lsfzly 时间:2017-02-27 15:39:06 0 删除 编辑


SQL> select to_char(scn_to_timestamp(5392048),'yyyy-mm-dd hh24:mi:ss') from dual;


TO_CHAR(SCN_TO_TIME
-------------------
2017-02-27 15:44:17


SQL> select timestamp_to_scn(to_timestamp('2017-02-27 15:44:17','yyyy-mm-dd hh24:mi:ss')) fr


TIMESTAMP_TO_SCN(TO_TIMESTAMP('2017-02-2715:44:17','YYYY-MM-DDHH24:MI:SS'))
---------------------------------------------------------------------------
                                                                    5392047


SQL> select timestamp_to_scn(to_timestamp('2017-02-27 15:01:17','yyyy-mm-dd hh24:mi:ss')) fr


TIMESTAMP_TO_SCN(TO_TIMESTAMP('2017-02-2715:01:17','YYYY-MM-DDHH24:MI:SS'))

---------------------------------------------------------------------------
                                                                    5390644


SQL>  select to_timestamp(scn_to_timestamp(5392048)) from dual;


TO_TIMESTAMP(SCN_TO_TIMESTAMP(5392048))
---------------------------------------------------------------------------
27-FEB-17 03.44.17.000000000 PM


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

请登录后发表评论 登录
全部评论

注册时间:2013-12-02

  • 博文量
    122
  • 访问量
    97505