Transact-SQL Reference
LOG
Returns the natural logarithm of the given float expression.
Syntax
LOG ( float_expression )
Arguments
float_expression
Is an expression of the float data type.
Return Types
float
Examples
This example calculates the LOG for the given float expression.
DECLARE @var float
SET @var = 5.175643
SELECT 'The LOG of the variable is: ' + CONVERT(varchar,LOG(@var))
GO
Here is the result set:
The LOG of the variable is: 1.64396
(1 row(s) affected)