Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

LOG() & LOG10() in SQL Server

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

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
Last Updated : 02 Sep, 2020
Like Article
Save Article
Similar Reads