A floating-point condition allows you to determine whether an expression is infinite or is the undefined result of an operation (not a number or NaN).
Syntax for floating-point conditions:
expr IS [ NOT ] { NAN INFINITE }
In the two types of floating-point conditions, namely { NAN INFINITE }, expr must be parsed into a numeric data type or any data type that can be implicitly converted into a numeric data type.
The following table describes the floating-point conditions.
| Condition type | Operation | Example |
|---|---|---|
| IS [NOT] NAN | If NOT is not specified and expr is the special value NaN, TRUE is returned. If NOT is specified and expr is not NaN, TRUE is returned. |
SELECT COUNT(*) FROM emp WHERE comm_pct IS NOT NAN; |
| IS [NOT] INFINITE | If NOT is not specified and expr is the special value +INF or -INF, TRUE is returned. If NOT is specified and expr is not +INF or -INF, TRUE is returned. |
SELECT last_name FROM emp WHERE salary IS NOT INFINITE; |