select date_add(
curdate(),interval(
CAST(help_topic_id as signed integer) - DATE_FORMAT(DATE_SUB(curdate(),INTERVAL 1 DAY ),’%d’)
) day
) date
from mysql.help_topic
where
help_topic_id < day(last_day(curdate())) #获取所有当前月日期
#help_topic_id<day(curdate()) #获取到当前日的日期
order by help_topic_id
获取当前月日期
最新推荐文章于 2023-12-11 18:19:09 发布