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.
我正在使用这三个字段...日期、mail_date 和dealer_id。我想知道是否有办法找出哪个dealer_id 和mail_date 直到mail_date 5 天后才在表格中有日期。
你可以试试这个:
从table1中选择mail_date、dealer_id,其中日期不在mail_date和mail_date+5之间;
尝试:
SELECT date, mail_date, dealer_id FROM tableName WHERE DATE_DIFF(mail_date, date)>=5
我认为那是正确的!试试看。如果没有,请发表评论。