MySQL查询生日是今天的用户

select * from customer where MONTH(birthday) = MONTH(NOW()) and DAY(birthday) = DAY(NOW())

如题,MySQL使用函数查询生日是今天的用户

-- 还有五天要过生日的用户
select * from customer where DATEDIFF(birthday,now()) = 5


猜你喜欢

转载自blog.csdn.net/key_artist/article/details/80937934