LOG10

Returns the 10-base logarithm value of a numeric expression

See also LOG (natural).

Syntax

LOG10( expr )

Arguments

Parameter

Description

expr

Positive numeric expression

Returns

Always returns a floating point result.

Notes

  • If the input value is NULL, the result is NULL.

Examples

Log (base 10) values

numbers=> SELECT LOG10(0.0001), LOG10(1), LOG10(100), LOG10(1000000);
log10 | log100 | log101 | log102
------+--------+--------+-------
   -4 |      0 |      2 |      6