totn Oracle Functions

Oracle / PLSQL: LN Function

This Oracle tutorial explains how to use the Oracle/PLSQL LN function with syntax and examples.

Description

The Oracle/PLSQL LN function returns the natural logarithm of a number.

Syntax

The syntax for the LN function in Oracle/PLSQL is:

LN( number )

Parameters or Arguments

number
The numeric value used to calculate the natural logarithm. It must be greater than 0.

Returns

The LN function returns a numeric value.

Applies To

The LN function can be used in the following versions of Oracle/PLSQL:

  • Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i

Example

Let's look at some Oracle LN function examples and explore how to use the LN function in Oracle/PLSQL.

For example:

LN(20)
Result: 2.99573227355399

LN(25)
Result: 3.2188758248682

LN(100)
Result: 4.60517018598809

LN(100.5)
Result: 4.61015772749913