IS INFINITE Predicate
An IS INFINITE
predicate determines whether an expression is infinite (positive infinity (INF
) or negative infinity (-INF
)).
SQL syntax
Expression
IS [NOT] INFINITE
Parameters
Parameter | Description |
---|---|
|
Expression to test. |
Description
-
An
IS INFINITE
predicate evaluates toTRUE
if the expression is positive or negative infinity. -
An
IS NOT INFINITE
predicate evaluates toTRUE
if expression is neither positive nor negative infinity. -
The expression must either resolve to a numeric data type or to a data type that can be implicitly converted to a numeric data type.
-
Two positive infinity values are equal to each other. Two negative infinity values are equal to each other.
-
Expressions containing floating-point values may generate
Inf
,-Inf
, orNaN
. This can occur either because the expression generated overflow or exceptional conditions or because one or more of the values in the expression wasInf
,-Inf
, orNaN
. Inf andNaN
are generated in overflow or division by 0 conditions. -
Inf
,-Inf
, andNaN
values are not ignored in aggregate functions.NULL
values are. If you want to excludeInf
andNaN
from aggregates (or from any selection), use both theIS NOT NAN
andIS NOT INFINITE
predicates. -
Negative infinity (
-INF
) sorts lower than all other values. Positive infinity (INF
) sorts higher than all other values, but lower thanNaN
("not a number") and theNULL
value. -
See "INF and NAN" for more information on
Inf
andNaN
.