oracle 查询N秒之前的数据
select* from txt001_menu
as of timestamp (systimestamp - interval '300'?minute)
wheremenuid = '060201' --查找txt001_menu表中300分鐘之前的數(shù)據(jù)
>>>>select * from txt001_menu as of timestamp (systimestamp - interval'600' second) where menuid = '060201' --查找txt001_menu表中600秒之前的數(shù)據(jù)
>>>>select * from txt001_menu as of timestamp (systimestamp - interval '3'hour)
wheremenuid = '060201' --查找txt001_menu表中3小時之前的數(shù)據(jù)
>>>>select * from txt001_menu as of timestamp (systimestamp - interval '1'day)
wheremenuid = '060201' --查找txt001_menu表中1天之前的數(shù)據(jù)
——————————————————————————————————————————————
?
timestamp(ags) 方法
interval(時間間隔)類型用來存儲兩個時間戳之間的時間間隔
?
時間間隔類型interval請看下一篇文章:http://blog.sina.com.cn/s/blog_4b5bc01101011d76.html
?
總結(jié)
以上是生活随笔為你收集整理的oracle 查询N秒之前的数据的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 免费有理之文件备份软件
- 下一篇: MySQL数据以全量和增量方式,向ES搜