positive
POSITIVE
説明
x
を値として返します。
構文
POSITIVE(x);
パラメーター
x
: BIGINT、DOUBLE、DECIMALV2、DECIMAL32、DECIMAL64、DECIMAL128 のデータ型がサポートされています。
戻り値
x
のデータ型と同じデータ型の値を返します。
例
mysql> select positive(3);
+-------------+
| positive(3) |
+-------------+
| 3 |
+-------------+
1 行が返されました (0.01 秒)
mysql> select positive(cast(3.14 as decimalv2));
+--------------------------------------+
| positive(CAST(3.14 AS DECIMAL(9,0))) |
+--------------------------------------+
| 3.14 |
+--------------------------------------+
1 行が返されました (0.01 秒)