Open In App

LOG() & LOG10() in SQL Server

Improve
Improve
Like Article
Like
Save
Share
Report

The LOG() function could be used to calculate the natural logarithm of a specific number.

1. LOG() :

Syntax :

SELECT LOG(number);

Note : Parameter number is mandatory. The number must be greater than 0.

Example –

SELECT LOG(2);
Output –

0.69314718055994529

2. LOG10() :
The LOG10() function could be used to calculate the natural logarithm to base 10 of a specific number.

Syntax :

SELECT LOG10(number);

Note : Parameter number is mandatory. The number must be greater than 0.

Example –
SELECT LOG10(2);

Output –

0.3010299956639812

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