77
MySQL LOG() Function
The Log() is a Math function of MySQL. This function is used to return either the natural logarithm of the given number if it has one parameter or specified base logarithm number if it has two parameters.
Syntax
Parameters:
number : It is the number for getting natural logarithm value.
base: It is the base of the natural logarithm.
Returns
This function returns the natural logarithm of the given number.
Note:
- If the number is less than or equal to 0, this function will return NULL.
- If the base is less than or equal to 1, this function will return NULL.
Example 1
Output:
Example 2
Output:
Example 3
Output:
Next TopicMySQL Math