DB2 Version 9.7 for Linux, UNIX, and Windows

LOG10 scalar function

Read syntax diagramSkip visual syntax diagram
>>-LOG10--(--expression--)-------------------------------------><

The schema is SYSIBM. (The SYSFUN version of the LOG10 function continues to be available.)

The LOG10 function returns the common logarithm (base 10) of a number.

The argument must be an expression that returns a value of any built-in numeric data type. If the argument is decimal floating-point, the operation is performed in decimal floating-point; otherwise, the argument is converted to double-precision floating-point for processing by the function. The value of the argument must be greater than zero (SQLSTATE 22003).

If the argument is DECFLOAT(n), the result is DECFLOAT(n); otherwise, the result is a double-precision floating-point number. The result can be null; if the argument is null, the result is the null value.

Notes

Example