82
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:
- This function returns the base-2 logarithm of a number.
- If the number is less than or equal to 0, this function will return NULL.
Example 1
Output:
Example 2
Output:
Next TopicMySQL Math