log

Description

Calculates the natural logarithm of the specified number.

Syntax

log(approx_numeric)

Parameters

approx_numeric

is any approximate numeric (float, real, or double precision) column name, variable, or constant expression.

Examples

Example 1

select log(20)
-------------------- 
             2.995732

Usage

log, a mathematical function, returns the natural logarithm of the specified value.

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute log.

See also

Documentation Transact-SQL Users Guide

Functions log10, power