Open In App

LOG10() Function in SQL Server

Improve
Improve
Like Article
Like
Save
Share
Report

This function returns the logarithm of a number to base 10.

Syntax :

LOG10(number)

Parameter :
This method accepts a single-parameter as mentioned above and described below.

  • number –
    This parameter hold a number which is greater than 0.

Returns –
It returns the base-10 logarithm of the specified number.

Let’s consider the following examples.
Example-1 :

SELECT LOG10(1) Result;

Output :

Result
0

Example-2 :

SELECT LOG10(10) Result;

Output :

Result
1

Example-3 :
Return the base-10 logarithm of 10.

SELECT LOG10(10);

Output :

1.0

Example-4 :
Return the base-10 logarithm of 1.

SELECT LOG10(1);

Output :

0.0

Example-5 :
When the argument passing as an expression.

SELECT LOG10(2 * 3);

Output :

0.77815125038364363

Last Updated : 29 Sep, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads