Mysql Ln Function
MySQL: LN Function
This tutorial explains how to use the MySQL LN function with syntax and examples.
Description
The MySQL LN function returns the natural logarithm of a number.
Syntax
The syntax for the LN function in MySQL is:
Parameters or Arguments
- number
The number to calculate the natural logarithm of. Must be greater than 0.
Note
- The LN function will return NULL, if number is less than or equal to 0.
- See also the LOG and EXP functions.
Applies To
The LN function can be used in the following versions of MySQL:
- MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23
Example
Let's look at some MySQL LN function examples and explore how to use the LN function in MySQL.
For example: