The LOG() function returns the natural logarithm of a specified number, or the logarithm of the number to the specified base.
Note: See also the LN() and EXP() functions.
LOG(
number)
OR:
LOG(
base, number)
Parameter | Description |
---|---|
number | Required. A number. Must be greater than 0 |
base | The base of number. Must be greater than 1 |
Works in: | From MySQL 4.0 |
---|
Return the natural logarithm of 4 to a specified base (2):
SELECT LOG(2, 4);
Try it Yourself »
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!