メインコンテンツまでスキップ
バージョン: 3.2

positive

説明​

x を値として返します。

構文​

POSITIVE(x);

パラメータ​

x: BIGINT、DOUBLE、DECIMALV2、DECIMAL32、DECIMAL64、および DECIMAL128 データ型をサポートします。

戻り値​

x の値のデータ型と同じデータ型の値を返します。

例​

mysql> select positive(3);
+-------------+
| positive(3) |
+-------------+
| 3 |
+-------------+
1 row in set (0.01 sec)

mysql> select positive(cast(3.14 as decimalv2));
+--------------------------------------+
| positive(CAST(3.14 AS DECIMAL(9,0))) |
+--------------------------------------+
| 3.14 |
+--------------------------------------+
1 row in set (0.01 sec)
Rocky the happy otterStarRocks Assistant

AI generated answers are based on docs and other sources. Please test answers in non-production environments.