Oracle Flashback Technologies - 閃回查詢

來源:互聯網
上載者:User

標籤:

Oracle Flashback Technologies - 閃回查詢

 

查看錶中,某行資料的修改記錄

#建立一個表,並插入和修改資料

SQL> create table y3(id int,name varchar2(20));Table created.SQL> insert into y3 values(1,‘wahaha‘);1 row created.SQL> commit;Commit complete.SQL> update y3 set name=‘nongfushanquan‘ where id=1;1 row updated.SQL> commit;Commit complete. SQL> update y3 set name=‘kaifei‘ where id=1;1 row updated.SQL> commit;Commit complete.SQL> update y3 set name=‘pijiu‘ where id=1;1 row updated.SQL> commit;Commit complete.SQL> update y3 set name=‘hongniu‘ where id=1;1 row updated.SQL> commit;Commit complete.SQL> update y3 set name=‘kele‘ where id=1;1 row updated.SQL> commit;Commit complete.SQL>


#查詢

#查詢SQL> select  2   name,  3   versions_starttime,  4   versions_startscn,  5   versions_endtime,  6   versions_endscn,  7   versions_xid,  8   versions_operation  9   from y3 10   versions between scn minvalue and maxvalue 11   where id = 1 12   order by 3 13   /NAME                 VERSIONS_STARTTIME        VERSIONS_STARTSCN VERSIONS_ENDTIME          VERSIONS_ENDSCN VERSIONS_XID     V-------------------- ------------------------- ----------------- ------------------------- --------------- ---------------- -wahaha               23-JUN-15 08.36.07 AM               1466318 23-JUN-15 08.36.46 AM             1466333 0400200065030000 Inongfushanquan       23-JUN-15 08.36.46 AM               1466333 23-JUN-15 08.37.16 AM             1466347 0A00040015040000 Ukaifei               23-JUN-15 08.37.16 AM               1466347 23-JUN-15 08.37.31 AM             1466355 070018009D030000 Upijiu                23-JUN-15 08.37.31 AM               1466355 23-JUN-15 08.37.49 AM             1466364 01000D0048030000 Uhongniu              23-JUN-15 08.37.49 AM               1466364 23-JUN-15 08.39.04 AM             1466400 02001B0021040000 Ukele                 23-JUN-15 08.39.04 AM               1466400                                           06000400DC040000 U6 rows selected.SQL>  

 

 

查看語句

select name, versions_starttime, versions_startscn, versions_endtime, versions_endscn, versions_xid, versions_operation from y3 versions between scn minvalue and maxvalue #versions between timestamp minvalue and maxvalue 也可以根據時間戳記來查看 where id = 1 order by 3 /

 

Oracle Flashback Technologies - 閃回查詢

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.