Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle PL/SQL LOG Function      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

Term: LOG

Definition:
The Oracle PL/SQL LOG function returns the logarithm of a number. It accepts two arguments where first represents the base and second is the input number.

Example Syntax:

LOG(x, y)

The example above reads as, "log base x of y."

Note that x must be an integer (and not equal to one or zero) and y must be a positive number.

The LOG function takes any numeric datatype or any nonnumeric datatype that can be implicitly converted to a numeric datatype. If either argument is BINARY_FLOAT or BINARY_DOUBLE, then the function returns BINARY_DOUBLE. Otherwise the function returns NUMBER.

Example Usage:

SELECT LOG(2,8) "Log" FROM DUAL;

Log
-----
3


Related Links:

Related Code Snippets:
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 187 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?