Returns the value of expr unchanged. POSITIVE is the unary plus operator and applies no transformation to the input.
Syntax
positive(<expr>)The return type matches the input type. For example, positive(BIGINT) returns BIGINT.
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
expr | Yes | TINYINT, SMALLINT, INT, BIGINT, DOUBLE, or DECIMAL | The input expression. |
Return value
Returns the value of expr. The return type is the same as the input type.
Examples
SELECT positive(1);
-- Returns: 1Related functions
POSITIVE is a mathematical function. For more information about functions related to data computing and conversion, see Mathematical functions.