WAS v8.5 > Develop applications > Develop Dynamic and EJB query > Develop applications that use EJB query > EJB query language > WHERE clauseBETWEEN predicate
The BETWEEN predicate determines whether a given value lies between two other given values.
The syntax for the predicate is:
expression [NOT] BETWEEN expression-2 AND expression-3
The expression must not evaluate to a boolean or reference type.
Example: BETWEEN predicate
e.salary BETWEEN 50000 AND 60000
is equivalent to:
e.salary >= 50000 AND e.salary <= 60000
e.name NOT BETWEEN 'A' AND 'B'
is equivalent to:
e.name < 'A' OR e.name > 'B'
Related concepts:
EJB query language
WHERE clause
Related
Use EJB query