SELECT
ROUND(TO_NUMBER(MONTHS_BETWEEN(TO_DATE('2008-03-04','YYYY-MM-DD'),TO_DATE('2008-02-04','YYYY-MM-DD'))))AS MOUTHSUN ,
FROM DUAL;
判断2个日期之间相差多少个月
最新推荐文章于 2024-02-03 20:43:32 发布
SELECT
ROUND(TO_NUMBER(MONTHS_BETWEEN(TO_DATE('2008-03-04','YYYY-MM-DD'),TO_DATE('2008-02-04','YYYY-MM-DD'))))AS MOUTHSUN ,
FROM DUAL;