LOG returns the log of the second argument with base of argument 1.

The base can be any positive number except 0 or 1, and the second argument can be any positive integer.

The arguments can be a numeric value or any type that can be implicitly converted to a numeric value.

The function returns a NUMBER value unless the argument is a BINARY_FLOAT, in this case the function will return a BINARY_DOUBLE.

Syntax:

LOG(n,n2)

Example:

SELECT log(10,20) as log_value from dual;

LOG_VALUE
——————-
1.30103

Log – Oracle SQL Function
Tagged on: