BETWEEN predicate |
|||||||||||
Syntax
BETWEEN predicate specifies the inclusive range to test the expression values. The range is defined by boundary expressions with AND keyword between them. Naturally, all the expressions in BETWEEN predicate must be the same data type, as in the case of comparison predicate. The predicate
is equal to the predicate
And the predicate
is equal to the predicate
If the value of the predicate exp1 BETWEEN exp2 AND exp3 is TRUE, it does not generally mean that the value of predicate exp1 BETWEEN exp3 AND exp2 is TRUE also, because the first one may be interpreted as the predicate
while the second one may be considered as
Example 5.2.3 Find model and processor speed of computers priced between and including $400 through $600:
|