MySql query BETWEEN two Strings sometimes doesn't work

Posted by bucabay on Stack Overflow See other posts from Stack Overflow or by bucabay
Published on 2010-03-12T16:45:22Z Indexed on 2010/03/12 16:47 UTC
Read the original article Hit count: 157

Filed under:
|

I have a mysql query where a subquery is:

BETWEEN '5.00' AND '10.00' 

And this returns no results.

However when I use Floats or Ints:

BETWEEN 5 and 10 

it works

The BETWEEN query also works for other values AS strings, but just not for 5 and 10.

EG:

BETWEEN '4' AND '5' 

works.

How could this be?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about query