在 Oracle SQL (11g) 中选择“现在减去 30 分钟”的所有行

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8523009/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 00:30:55  来源:igfitidea点击:

Select all Rows with "Now minus 30 minutes" in Oracle SQL (11g)

sqloracletimestamporacle11g

提问by erikbwork

How do I express "now minus 30 minutes" in an Oracle SQL WHERE, so that I can compare it with a stored timestamp?

如何在 Oracle SQL WHERE 中表达“现在减去 30 分钟”,以便可以将其与存储的时间戳进行比较?

回答by Eric

The solution is either the dateadd()function or

解决方案是dateadd()函数或

systimestamp - INTERVAL '30' minute(1)

回答by xbrady

where yourTimestamp >= sysdate - 1/48