Comparison Predicates
Purpose
Comparison predicates compare two expressions and return whether the comparison is true.
Syntax
Usage Notes
The following tables lists the comparison predicates you can use:
| Predicates | Description |
|---|---|
=
|
Equality check |
!=
|
Inequality check (the aliases <> and ^= also exist for this) |
<
|
Check for "less than" |
<=
|
Check for "less than or equal to" |
>
|
Check for "more than" |
>=
|
Check for "more than or equal to" |
- If one of the two expressions is a
NULLvalue, the result is also aNULLvalue.
Example:
SELECT 1=1, 1<1, 1!=null;