类别:

数值函数 (对数)

LN

返回数值表达式的自然对数。

语法

LN(<expr>)
Copy

Returns

If the input expression is of type DECFLOAT, the returned type is DECFLOAT. Otherwise, the returned type is FLOAT.

示例

SELECT x, ln(x) FROM tab;

--------+-------------+
   X    |    LN(X)    |
--------+-------------+
 1      | 0           |
 10     | 2.302585093 |
 100    | 4.605170186 |
 [NULL] | [NULL]      |
--------+-------------+
Copy
语言: 中文