ISINF
Description
Determines whether the specified value is infinity.
Syntax
ISINF(<value>)
Parameters
Parameter | Description |
---|---|
<value> | The value to be checked, which must be a DOUBLE or FLOAT type |
Return Value
Returns 1 if the value is infinity (positive or negative), otherwise returns 0. If the value is NULL, returns NULL.
Examples
SELECT isinf(1);
+----------+
| isinf(1) |
+----------+
| 0 |
+----------+
SELECT cast('inf' as double),isinf(cast('inf' as double))
+-----------------------+------------------------------+
| cast('inf' as double) | isinf(cast('inf' as double)) |
+-----------------------+------------------------------+
| Infinity | 1 |
+-----------------------+------------------------------+
SELECT isinf(NULL)
+-------------+
| isinf(NULL) |
+-------------+
| NULL |
+-------------+