-- 當前日期
SELECT TO_CHAR(ADD_MONTHS(SYSDATE, 0), 'yyyy-MM-dd') PRETODAY FROM DUAL
-- 上月當前日期
SELECT TO_CHAR(ADD_MONTHS(SYSDATE, -1), 'yyyy-MM-dd') PRETODAY FROM DUAL
-- 下月當前日期
SELECT TO_CHAR(ADD_MONTHS(SYSDATE, 1), 'yyyy-MM-dd') PRETODAY FROM DUAL
-- 上月首天
SELECT TO_CHAR(ADD_MONTHS(LAST_DAY(SYSDATE) + 1, -2),'yyyy-MM-dd') FIRSTDAY FROM DUAL
-- 上月月末
SELECT TO_CHAR(LAST_DAY(ADD_MONTHS(LAST_DAY(SYSDATE) + 1, -2)),'yyyy-MM-dd') FIRSTDAY FROM DUAL
-- 當月首天
SELECT TO_CHAR(ADD_MONTHS(LAST_DAY(SYSDATE) + 1, -1), 'yyyy-MM-dd') FIRSTDAY FROM DUAL
-- 當月月末
SELECT TO_CHAR(LAST_DAY(ADD_MONTHS(LAST_DAY(SYSDATE) + 1, -1)),'yyyy-MM-dd') FIRSTDAY FROM DUAL
-- 下月首天
SELECT TO_CHAR(ADD_MONTHS(LAST_DAY(SYSDATE) + 1, 0), 'yyyy-MM-dd') FIRSTDAY FROM DUAL
-- 下月月末
SELECT TO_CHAR(LAST_DAY(ADD_MONTHS(LAST_DAY(SYSDATE) + 1, 0)), 'yyyy-MM-dd') FIRSTDAY FROM DUAL