Background documentationBETWEEN Predicate (between_predicate) Locate this document in the navigation structure

 

The BETWEEN predicate (between_predicate) is a predicate that checks whether a value lies in a predefined interval.

Structure

Syntax Syntax

  1. <between_predicate> ::=
      <expression> [NOT] BETWEEN <expression> AND <expression>
End of the code.
Explanation

Let x, y, and z be the results of the first, second, and third expression (expression). The values x, y and z must be comparable with each other.

BETWEEN Predicate (between_predicate)

x, y, z

Result of the Specified Predicate

x BETWEEN y AND z

x>=y AND x<=z

x NOT BETWEEN y AND z

NOT(x BETWEEN y AND z)

x, y or z are NULL values

x [NOT] BETWEEN y AND z is undefined