SELECT *
FROM TAB C
WHERE TO_DATE((CASE
WHEN TO_CHAR(SYSDATE, 'mm') = '12' AND
TO_CHAR(BIRTHDAY, 'mm') = '01' THEN
TO_CHAR(SYSDATE + 31, 'YYYY')
ELSE
TO_CHAR(SYSDATE, 'YYYY')
END) || '-' || TO_CHAR(BIRTHDAY, 'MM-DD'),
'YYYY-MM-DD') BETWEEN SYSDATE AND SYSDATE + 30
AND BIRTHDAY IS NOT NULL;
上面是查询30天内过生日的员工(30可以该成自己想要的天数)`