Which function in SQL is used to calculate natural log of a specific number?

LN() function :

It is the function in SQL is used to calculate the natural logarithm of a specific number with base e . The number must be greater than 0, otherwise it will return NULL.

Syntax :

LN(X)

Parameter :

LN() function accepts one parameter as mentioned above in the syntax and described below as follows.

X – A number whose logarithm value with base e we want to calculate. It should be a positive number.

Returns :

It returns the natural logarithm of given number x with base e.

Example:

The logarithm of the given number with base e using the LN() function.

SELECT LN(1000) AS Ln_Val ;

Output :

LN_VAL

6.90775527898