FLASHBACK的多版本查詢

wei-xh發表於2011-01-25

col a for 99999999999999999999
select timestamp_to_scn(to_timestamp('2011-01-24 16:17:38','yyyy-mm-dd hh24:mi:ss')) a from dual;

                    A
---------------------
        9496255704078

select timestamp_to_scn(to_timestamp('2011-01-24 16:28:52','yyyy-mm-dd hh24:mi:ss')) a from dual;

                    A
---------------------
        9496256954638

SELECT member_id,modifier,gmt_modified
          VERSIONS_STARTSCN,
           VERSIONS_ENDSCN,
          VERSIONS_OPERATION,
           VERSIONS_XID
      FROM global_account_biz VERSIONS BETWEEN SCN 9496255704078 AND 9496256954638
      where global_id=382152708 order by VERSIONS_STARTSCN;


MEMBER_ID       MODIFIER        VERSIONS_STARTSCN   VERSIONS_ENDSCN VE VERSIONS_XID
--------------- --------------- ------------------- --------------- -- ----------------
zhiyuanyinhua   modifier        2011-01-24 16:16:04      9.4963E+12 U  001000010017CDA4
zhiyuanyinhua   xzhuxiaona      2011-01-24 16:16:19      9.4963E+12
xzzyyh          xzhuxiaona      2011-01-24 16:17:38      9.4963E+12 U  0026000700107ADE
xzzyyh          esbService      2011-01-24 16:17:39      9.4963E+12 U  00010010001A576F
zhiyuanyinhua   xzhuxiaona      2011-01-24 16:21:52      9.4963E+12 U  002500140010C5CA
xzzyyh          synAvInfoByEsb  2011-01-24 16:21:54      9.4963E+12 U  0039001500081F27
xzzyyh          esb             2011-01-24 16:24:29                 U  0039001600083F4C

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

相關文章