ADD_MONTHS()
1) Syntax
- ADD_MONTHS(DATE, INTEGER)
2) Purpose
- ADD_MONTHS returns the date, date plus integer
months
3) Example
3_1. Before month
select to_char(add_months(sysdate, -1),'yyyymmddhh24miss')
from dual;
3_2. After month
select to_char(add_months(sysdate, 1),'yyyymmddhh24miss')
from dual;
'DB > Oracle' 카테고리의 다른 글
[Oracle] How to get a weekend (0) | 2016.06.07 |
---|---|
[Oracle] START WITH, CONNTECT BY (0) | 2016.04.15 |
[Oracle] ORA-01427 (0) | 2016.04.05 |
[Oracle] - LAST_DAY() (0) | 2016.04.05 |
[Oracle] - Explicit Cursor (0) | 2016.04.04 |