LOG()
LOG() is a SQL function in the Numeric Functions category. Returns the natural logarithm (single arg) or logarithm to a specified base. The syntax is LOG(base, number) / LOG(number). It accepts base, number. It returns float logarithm. A typical example: SELECT LOG(100); -- Natural log of 100: 4.605... SELECT LOG(10, 100); -- Log base 10 of 100: 2 A close relative is ROUND(), which rounds a number to a specified number of decimal places. A close relative is ABS(), which returns the absolute (positive) value of a number. A close relative is CEIL() / CEILING(), which returns the smallest integer greater than or equal to a number (rounds up). More about this category: Mathematical functions — ROUND, ABS, CEIL, FLOOR, POWER, SQRT, MOD. Related Numeric Functions entries: ROUND(), ABS(), CEIL() / CEILING(), FLOOR(), POWER() / POW(), SQRT(), MOD(), GREATEST() / LEAST().