SQLite log10() Function

The SQLite log10() function returns the base 10 logarithm for the number specified by the parameter.

Syntax

Here is the syntax of the SQLite log10() function:

log10(numeric_value)

Parameters

numeric_value

Required. A number whose logarithm needs to be obtained.

Return value

The SQLite log10() function returns numeric_value the .

The SQLite log10() function will return NULL if the parameter is NULL.

The SQLite log10() function will return NULL if the parameter is zero.

The SQLite log10() function will return NULL if the parameter is negative.

The SQLite log10() function will return NULL if the parameter is not numeric.

Examples

This example shows the basic usage of the SQLite log10() function:

SELECT
    log10(1),
    log10(2),
    log10(3.3);
  log10(1) = 0.0
  log10(2) = 0.301029995663981
log10(3.3) = 0.518513939877887