select
to_char(add_months(trunc(sysdate, 'year'), level - 1), 'MON-YYYY') mon
from dual
connect by level <= to_number(to_char(sysdate, 'MM'))
MON
--------
JAN-2019
FEB-2019
MAR-2019
APR-2019
to_char(add_months(trunc(sysdate, 'year'), level - 1), 'MON-YYYY') mon
from dual
connect by level <= to_number(to_char(sysdate, 'MM'))
MON
--------
JAN-2019
FEB-2019
MAR-2019
APR-2019
1 comment:
It is very helpful. Thanks
Post a Comment