SyntaxFix
Write A Post
Hire A Developer
Questions
Your logic is backwards.
SELECT * FROM `test_table` WHERE start_date NOT BETWEEN CAST('2009-12-15' AS DATE) and CAST('2010-01-02' AS DATE) AND end_date NOT BETWEEN CAST('2009-12-15' AS DATE) and CAST('2010-01-02' AS DATE)