Oracle 时间戳差异大于 X 小时/天/月
我正在尝试编写一个在 Oracle 数据库上运行的查询。表 ActionTable 包含 actionStartTime 和 actionEndTime 列。我需要找出哪个操作花费了超过 1 小时才能完成。
actionStartTime 和 actionEndTime 是时间戳类型
我有一个查询,它给出每个操作所花费的时间:
select (actionEndTime - actionStartTime) actionDuration from ActionTable
我的 where
子句将只返回花费超过 1 小时才能完成的操作?
I am trying to write a query to run on Oracle database. The table ActionTable contains actionStartTime and actionEndTime columns. I need to find out which action took longer than 1 hour to complete.
actionStartTime and actionEndTime are of timestamp type
I have a query which gives me the time taken for each action:
select (actionEndTime - actionStartTime) actionDuration from ActionTable
What would be my where
clause that would return only actions that took longer than 1 hour to finish?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
两个时间戳相减返回一个时间间隔。所以你想要类似的东西
Subtracting two timestamps returns an interval. So you'd want something like