POSITIVE
Descriptionβ
Returns the value itself.
Syntaxβ
POSITIVE(<x>)
Parametersβ
Parameter | Description |
---|---|
<x> | The value that needs to be returned. |
Return valueβ
Returns an integer or a floating-point number. Special cases:
- If the parameter is NULL, return NULL.
Exampleβ
SELECT positive(-10);
+---------------+
| positive(-10) |
+---------------+
| -10 |
+---------------+
SELECT positive(10.111);
+------------------+
| positive(10.111) |
+------------------+
| 10.111 |
+------------------+
SELECT positive(12);
+--------------+
| positive(12) |
+--------------+
| 12 |
+--------------+
SELECT positive(null);
+----------------+
| positive(NULL) |
+----------------+
| NULL |
+----------------+