December 12th, 2008

LN (natural logarithm)

The LN function returns the natural logarithm of a number, which is the power to which you would need to raise the constant e (approximately 2.718281828…) in order to get the result.
Format:                        LN(expression)

Example:           SELECT LN(2.718281) FROM TABLEA;

Result:

                   

> DB2, Oracle, and PostgreSQL support the LN function.

> DB2 and PostgreSQL also support LOG as a synonym.

> MySQL and SQL Server only support the non-standard LOG function.

> Use the EXP function to reverse the process.

 

Leave a reply

:mrgreen: :neutral: :twisted: :shock: :smile: :???: :cool: :evil: :grin: :oops: :razz: :roll: :wink: :cry: :eek: :lol: :mad: :sad: