title: MySQL: Compare BETWEEN time
body: <p>This may be impossible in the way that I'd like to have it work, but here goes.</p>
  
  <pre><code>SELECT * FROM `table` WHERE CAST('05:00:00' AS time) BETWEEN `start` AND `end`
  </code></pre>
  
  <p>The entries in the database are:</p>
  
  <pre><code>`start` = '22:59:59'
  `end` = '06:00:00'
  </code></pre>
  
  <p>However, the query returns no results. Of course, this would work if there were dates involved, however there are not. It would also work if the start was = '00:00:00'.</p>