Skip to main content

LOG10

Calculates the base-10 logarithm of a given number, determining the power to which the number 10 must be raised to achieve the value.

See also:
[SELECT]


Syntax

SELECT LOG10(numeric_expression) FROM <multipartIdentifier>;

Arguments

numeric_expression
A positive numeric expression for which the base-10 logarithm is to be calculated.

Return Value(s)

Returns the base-10 logarithm of the specified numeric value.


Examples

Calculate the base-10 logarithm of 100

SELECT LOG10(100) AS log_result;

This query returns 2, as (10^2 = 100).

Calculate the base-10 logarithm of 1000

SELECT LOG10(1000) AS log_result;

This query calculates the base-10 logarithm of 1000, resulting in 3, since (10^3 = 1000).