select * from (select MONTHS_BETWEEN(sysdate(),worktime) AS result,* from F_CIS_SDT_TAX_GRANT_INFO) tmp_0 where result<=24 ---计算两个日期之间的月份差值