Skip to content
Related Articles

Related Articles

Improve Article
LOG() & LOG10() in SQL Server
  • Last Updated : 02 Sep, 2020

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
My Personal Notes arrow_drop_up
Recommended Articles
Page :