Floating-point conditions allow you to determine whether an expression is infinite or results in an undefined value (not a number or NaN).
The syntax for floating-point conditions is as follows:
expr IS [ NOT ] { NAN | INFINITE }
In both forms of floating-point conditions, expr must resolve to a numeric data type or any data type that can be implicitly converted to a numeric data type.
The following table provides more information about floating-point conditions.
Condition Type |
Operation |
Example |
|---|---|---|
| IS [NOT] NAN | When NOT is not specified, returns TRUE if expr is the special value NaN. When NOT is specified, returns TRUE if expr is not the special value NaN. |
SELECT COUNT(*) FROM emp WHERE comm_pct IS NOT NAN; |
| IS [NOT] INFINITE | When NOT is not specified, returns TRUE if expr is the special value +INF or -INF. When NOT is specified, returns TRUE if expr is not +INF or -INF. |
SELECT last_name FROM emp WHERE salary IS NOT INFINITE; |
