ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 10G--Flashback Version Query Syntax

10G--Flashback Version Query Syntax

原创 Linux操作系统 作者:vongates 时间:2018-12-31 13:12:04 0 删除 编辑
我們知道在10G中flashback query的功能更為強大,不再限于dbms_flashback這個package,而是有更大的變化,這里記錄一下flashback versions query syntax:
 
SELECT [Pseudocolumns]
FROM
  VERSIONS BETWEEN
  {SCN|TIMESTAMP {expr|MINVALUE} AND
              {expr|MAXVALUE}}
  [AS OF {SCN|TIMESTAMP expr}]
WHERE [Pseudocolumns]
附上對偽列的描述: 
Pseudocolumn             Description
VERSIONS_STARTTIME
VERSIONS_STARTSCN   Version validity range lower bound
VERSIONS_ENDTIME
VERSIONS_ENDSCN     Version validity range upper bound
VERSIONS_XID        Transaction that created the version
VERSIONS_OPERATION  Operation that produced the version
實例:
SELECT versions_xid AS XID,
       versions_startscn AS START_SCN,
       versions_endscn AS END_SCN,
       versions_operation AS OPERATION,
       versions_starttime as start_time,
       versions_endtime as end_time,
       ename
  FROM scott.emp VERSIONS BETWEEN timestamp MINVALUE AND MAXVALUE
 where empno = 7902

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

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

注册时间:2018-09-11

  • 博文量
    449
  • 访问量
    292657