Javatpoint Logo
Javatpoint Logo

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:

  1. If the number is less than or equal to 0, this function will return NULL.
  2. If the base is less than or equal to 1, this function will return NULL.

Example 1

Output:


MySQL Math LOG() Function

Example 2

Output:


MySQL Math LOG() Function

Example 3

Output:


MySQL Math LOG() Function
Next TopicMySQL Math




Help Others, Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA