>>>>> "Terry" == Terry West <terry@stripped> writes:
Terry> In a small test table with 1 enum field and four records
Terry> (with values 'a','b','c' and 'd'), I find the following selects work:
Terry> select * from enumtest where colname between 'b' and 'c'
Terry> select * from enumtest where colname > 1 and colname < 4
Terry> but this does not:
Terry> select * from enumtest where colname between 2 and 3
Terry> Just wondering if the latter is supposed to work. I've tried
Terry> this test on Linux 3.23.2 and Solaris 3.22.20a.
BETWEEN compares the arguments depending on the type of the first
argument. In your case 'colname' is regarded as a string and the
comparions is done with strings.
select * from enumtest where colname+0 between 2 and 3