To "apply affinity" means to convert an operand to a particular storage class if and only if the conversion is lossless and reversible. Affinity is applied to operands of a comparison operator prior to the comparison according to the following rules in the order shown:
If one operand has INTEGER, REAL or NUMERIC affinity and the other operand as TEXT or NONE affinity then NUMERIC affinity is applied to other operand.
If one operand has TEXT affinity and the other has NONE affinity, then TEXT affinity is applied to the other operand.
Otherwise, no affinity is applied and both operands are compared as is.
The expression "a BETWEEN b AND c" is treated as two separate binary comparisons "a >= b AND a __EXPRESSION__s.</P>