Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包含几个字段的表,其中一个是日期字段,我想获取与当前月份相关的所有数据信息。
如何根据申请日期每月提取数据。
table name=user fields=name, email,phone,dob,bank account no,application date
效率不高,但应该做的工作:
SELECT name, email, phone, dob, bank_account_no FROM user WHERE DATE_FORMAT(application_date, '%Y-%m') = DATE_FORMAT(NOW(), '%Y-%m')