标签: mysql sql date select
SELECT * FROM table WHERE date = DATE(DATE_ADD(NOW(), INTERVAL 8 DAY))
如何修改此查询,以便我可以获得过去12天内已过期的exipry_date列表?
exipry_date
答案 0 :(得分:0)
SELECT * FROM `table` WHERE `exipry_date` BETWEEN DATE_ADD(NOW(), INTERVAL -12 DAY) AND NOW();