select * from customer where MONTH(birthday) = MONTH(NOW()) and DAY(birthday) = DAY(NOW())
如題,MySQL使用函數查詢生日是今天的用戶
-- 還有五天要過生日的用戶
select * from customer where DATEDIFF(birthday,now()) = 5
原文鏈接:https://blog.csdn.net/key_artist/article/details/80937934
select * from customer where MONTH(birthday) = MONTH(NOW()) and DAY(birthday) = DAY(NOW())
如題,MySQL使用函數查詢生日是今天的用戶
-- 還有五天要過生日的用戶
select * from customer where DATEDIFF(birthday,now()) = 5
原文鏈接:https://blog.csdn.net/key_artist/article/details/80937934
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。