POWER
Syntax
Purpose
POWER
returns n2
raised to the n1
power. The base n2
and the exponent n1
can be any numbers, but if n2
is negative, then n1
must be an integer.
This function takes as arguments any numeric datatype or any nonnumeric datatype that can be implicitly converted to a numeric datatype. If any argument is BINARY_FLOAT
or BINARY_DOUBLE
, then the function returns BINARY_DOUBLE
. Otherwise the function returns NUMBER
.
See Also:
for more information on implicit conversion
Examples
The following example returns 3 squared:
SELECT POWER(3,2) "Raised" FROM DUAL; Raised---------- 9
MOD
Syntax
Purpose
MOD
returns the remainder of n2
divided by n1
. Returns n2
if n1
is 0.
This function takes as arguments any numeric datatype or any nonnumeric datatype that can be implicitly converted to a numeric datatype. Oracle determines the argument with the highest numeric precedence, implicitly converts the remaining arguments to that datatype, and returns that datatype.
See Also:
for more information on implicit conversion and for information on numeric precedence
Examples
The following example returns the remainder of 11 divided by 4:
SELECT MOD(11,4) "Modulus" FROM DUAL; Modulus---------- 3