Mysql
 sql >> Database >  >> RDS >> Mysql

MySQL:clausola IN per le date TRA una data di inizio e di fine?

SELECT id, starts_at, ends_at, title
FROM yourtable
WHERE '2011-01-01' BETWEEN starts_at AND ends_at
OR    '2011-05-01' BETWEEN starts_at AND ends_at
OR    '2011-10-01' BETWEEN starts_at AND ends_at