totn MariaDB Functions

MariaDB: LOG10 Function

This MariaDB tutorial explains how to use the MariaDB LOG10 function with syntax and examples.

Description

The MariaDB LOG10 function returns the base-10 logarithm of a number.

Syntax

The syntax for the LOG10 function in MariaDB is:

LOG10( number )

Parameters or Arguments

number
The number to take the base-10 logarithm of. Must be greater than 0.

Note

  • The LOG10 function will return NULL, if number is less than or equal to 0.
  • See also the LOG function.

Applies To

The LOG10 function can be used in the following versions of MariaDB:

  • MariaDB 10

Example

Let's look at some MariaDB LOG10 function examples and explore how to use the LOG10 function in MariaDB.

For example:

SELECT LOG10(0.7);
Result: -0.1549019599857432

SELECT LOG10(3);
Result: 0.47712125471966244

SELECT LOG10(3.25);
Result: 0.5118833609788744

SELECT LOG10(0);
Result: NULL