«Back to Home

Oracle Jump Start

Topics

How To Use Log Function In Oracle

Description
 
Log function returns the logarithm of n base m in Oracle/PLSQL. Log function returns decimal value.
 
Syntax 
1 

Example
  1. Select Log (12, 15)  
  2. From Dual;  
2

Example
  1. Select Log (2, 18)   
  2. From Dual;  
3

Example
  1. Select Log (125, 2)   
  2. From Dual;  
4

Log function can be used in following Oracle versions in Oracle/PLSQL-
Oracle 8i, Oracle 9i, Oracle 10g, Oracle 11g, Oracle 12c.
 
Summary
 
Thus, we learnt, Log function returns the logarithm of n base m in Oracle/PLSQL. Log function returns decimal value. We learnt, how to use this function with the examples.