The between predicate is used test whether a value is within a given closed value range.
<between predicate> ::= <value expression> ( NOT )? BETWEEN <lower bound> AND <upper bound>. |
The data types of the three <value expression>s in a <between predicate> must be comparable.
The <between predicate> "a NOT BETWEEN b AND c" is equivalent to the <boolean factor> "NOT ( a BETWEEN b AND c )".
The <between predicate> "a BETWEEN b AND c" is equivalent to the <boolean term> "a >= b AND a <= c".
SELECT * FROM a WHERE c BETWEEN 1 AND 100 |
BETWEEN PREDICATE. This SELECT yields all rows from table a where the value of the column a.c is greater or equal to 1 and lower or equal to 100.