Returns the natural logarithm of a number. LN and LOG are both supported, perform the same function, and can be used interchangeably

Syntax

LN ( expression )
or
LOG ( expression )

Arguments

expression: a positive number of type DOUBLE.

Returns

Returns a DOUBLE value. Returns NULL when expression is NULL.

Examples

SELECT numberCol, LN(numberCol) AS numberColLN FROM MYSQL.inventory.cust;

VALUES LN(10)
-- Returns 2.30259