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í)之前的數(shù)據(jù)
>>>>select * from txt001_menu as of timestamp (systimestamp - interval '1'day)
wheremenuid = '060201' --查找txt001_menu表中1天之前的數(shù)據(jù)
——————————————————————————————————————————————
?
timestamp(ags) 方法
interval(時(shí)間間隔)類(lèi)型用來(lái)存儲(chǔ)兩個(gè)時(shí)間戳之間的時(shí)間間隔
?
時(shí)間間隔類(lèi)型interval請(qǐng)看下一篇文章:http://blog.sina.com.cn/s/blog_4b5bc01101011d76.html
?
總結(jié)
以上是生活随笔為你收集整理的oracle 查询N秒之前的数据的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 免费有理之文件备份软件
- 下一篇: Citrix VDI攻略之三:DDC安装