Javatpoint Logo
Javatpoint Logo

MySQL LOG2() Function

The log2() is a Math function of MySQL. This function is used to get the base-2 logarithm of given number.

Syntax

Parameter:

number: It is the number for base-2 logarithm value.

Returns:

  1. This function returns the base-2 logarithm of a number.
  2. If the number is less than or equal to 0, this function will return NULL.

Example 1

Output:


MySQL Math LOG2() Function

Example 2

Output:


MySQL Math LOG2() Function
Next TopicMySQL Math





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA