Add a range comparison (BETWEEN) predicate to an SQL statement
The range comparison (BETWEEN) predicate compares a value with a range of
values.
These steps are part of the larger task of adding search conditions to an
SQL statement (WHERE or HAVING clause). When you complete the steps for
adding a simple comparison predicate to an SQL statement, return to
Add search conditions to an SQL statement (WHERE or HAVING clause).
To add a range comparison (BETWEEN) predicate to an SQL
statement:
- In the Operator list, specify the type of range comparison you
want to perform:
- To include a range between two values, click BETWEEN.
- To include a range outside two values, click NOT BETWEEN.
- In the Minimum value and Maximum value fields,
specify a minimum and a maximum value for comparison. You can:
- Type a value.
- Click
List Values to open a window where you can select from a list of unique values for this column in the current database.
- Click Expression
to open a window where you can create an expression.
- Click Host variable to open a window where you can add a host variable name.
Return to Add search conditions to an SQL
statement (WHERE or HAVING clause)