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] INFINITEParameters
| Parameter | Description |
|---|---|
|
|
Expression to test. |
Description
-
An
IS INFINITEpredicate evaluates toTRUEif the expression is positive or negative infinity. -
An
IS NOT INFINITEpredicate evaluates toTRUEif 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 andNaNare generated in overflow or division by 0 conditions. -
Inf,-Inf, andNaNvalues are not ignored in aggregate functions.NULLvalues are. If you want to excludeInfandNaNfrom aggregates (or from any selection), use both theIS NOT NANandIS NOT INFINITEpredicates. -
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 theNULLvalue. -
See "INF and NAN" for more information on
InfandNaN.