Mysql LOG2
From w3cyberlearnings
Contents |
MySQL LOG2 Function
This function returns the base-2 logrithmn of X.
Syntax LOG2
X is a number.
LOG2(X);
Example 1
mysql> SELECT LOG2(4); +---------+ | LOG2(4) | +---------+ | 2 | +---------+ 1 row in set (0.00 sec)
Example 2
mysql> SELECT LOG2(8); +---------+ | LOG2(8) | +---------+ | 3 | +---------+ 1 row in set (0.00 sec)