Skip to content

LOG

  • b: The base of the logarithm. It is a positive number that is not equal to 1. If B is not specified, the base defaults to 10.
  • x: The number for which the logarithm is to be calculated. It is a positive number. If X is equal to 1, the result is 0; If X is less than 1, the result is negative.
SELECT LOG(10);
2.30258509299404568402

The LOG() function in MySQL performs a natural logarithm of a number. In the above example, it calculates the natural logarithm of 10, resulting in an output of approximately 2.3026.