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