更新 Sysdate - 在 Oracle 中 10 分钟
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10741093/
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:50:28 来源:igfitidea点击:
Update Sysdate - 10 min in Oracle
提问by Vaandu
I need to update a date column, with sysdate but 10 mins past. Is there any way to do?
我需要使用 sysdate 但 10 分钟后更新日期列。有什么办法吗?
Please help.
请帮忙。
回答by a_horse_with_no_name
UPDATE the_table
SET the_column = current_timestamp - interval '10' minute
WHERE pk = 42;
It certainly works, see here: http://sqlfiddle.com/#!4/a1986/2
它当然有效,请参见此处:http: //sqlfiddle.com/#!4/a1986/2
回答by Rahul
Like this probably
大概是这样的
select sysdate - 10/(24*60) from dual;