oracle查詢某個時間點的數據


1. select * from emps as of timestamp to_Date('2015-12-11 14:00:00','yyyy-mm-dd hh24:mi:ss'),SQL語句是查詢某一時間點上的表中的所有數據,可用於恢復誤刪(全部誤刪)的數據

2.恢復誤刪數據(全部誤刪)

insert inot emps  select * from emps as of timestamp to_Date('2015-12-11 14:00:00','yyyy-mm-dd hh24:mi:ss')

3.恢復部分誤刪數據:

insert into emp   (select * from emps  as of timestamp to_Date('2015-12-11 14:00:00','yyyy-mm-dd hh24:mi:ss')  where emp_id not in (select emp_id from emps))

只插入誤刪的數據,將表中存在的數據過濾掉


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM