oracle 中的几天后,几年后
生活随笔
收集整理的這篇文章主要介紹了
oracle 中的几天后,几年后
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
首先,需要記住Oracle里面的日期加減是按照天來計算的
增加一小時:
select date + 1/24 from test;?
?
增加一個月:
select add_months(date,1) from test?
增加一年:?
select add_months(date,12) from test?
?增加3年2個月:
select date + interval '3-2' year to month from test?
?
增加10天2小時10分:
select sysdate + interval '10 2:10' day to minute from test?
?
?
總結
以上是生活随笔為你收集整理的oracle 中的几天后,几年后的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Spring quartz 并发性研究
- 下一篇: java导出txt