Skip to main content

Overview

LN() will return the exponential value of its argument, which is recognized as the input parameter’s natural logarithm.
Info:
The logarithm doesn’t take negative numbers or 0.

*yntax

The syntax of the LN() function is described as follows.
x:  A positive or a negative number (or an expression that evaluates to a number).

Examples

Case #1: Basic LN() function

The example below shows that LN() function will return the natural logarithm of the number 7,87653.
The final result is as follows.

Case #2: Using LN() Function With a Table

In the following example, we will combine LN() function with CREATE TABLE statement. Therefore we can obtain natural logarithmic values of a specific column.
  1. Create a new table named LNTable containing the initValue column with an integer value.
  1. Run the following query to get the logarithm output of the column:
  1. It will return the initial value with its natural logarithm value.
  • initValue column with the initial integer values.
  • lnValue column with the natural logarithm values.