Mysql
 sql >> Datenbank >  >> RDS >> Mysql

MySQL:IN-Klausel für Daten ZWISCHEN einem Start- und Enddatum?

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