BETWEEN predicate

The BETWEEN predicate determines whether a given value lies between two other given values

expression  [NOT]  BETWEEN expression-2  AND expression-3


Example: BETWEEN predicate

e.salary BETWEEN 50000 AND 60000

is equivalent to

e.salary >= 50000  AND e.salary <= 60000 NOT BETWEEN 'A' AND 'B' 

is equivalent to < 'A'  OR > 'B'


See Also

EJB query language
WHERE clause
Using EJB query