So I'm trying to query on a character range, i.e. all manufacturers with names starting with a or b:
SELECT manufacturer FROM warehouse WHERE manufacturer >= 'a' AND manufacturer <= 'b'
or:
SELECT manufacturer FROM warehouse WHERE manufacturer BETWEEN 'a' and 'b'
For both of these queries, I only get back manus with names starting with a. If I changed the range to a-c, I would get back all with a-b. Why is the upper bound of the range not inclusive? My main issue with this is how can I include all 'Z's in the range. A-Z would not include any z's in this case.
The manual here: http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html#operator_between ... seems pretty self explanatory. Unfortunately things are not working the way they should.
The weird part is, this works when I create a small test table. However it does not work properly on my 15 million row table.