The LN (natural log) function in Oracle SQL / PLSQL is used to return the natural logarithmic value of a number.
Syntax for the LOG function in Oracle SQL / PLSQL is:
SELECT LN(n)
FROM table_name;
n must be a positive number
Example 1:
1 | SELECT LN(20) |
2 | FROM DUAL; |
Will return “2.99573227355399”
Example 2:
1 | SELECT LN(1) |
2 | FROM DUAL; |
Will return “0”