Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

MySQL:cláusula IN para datas ENTRE uma data de início e término?

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