Oracle Number Function - Oracle/PLSQL POWER Function






This Oracle tutorial explains how to use the Oracle/PLSQL POWER function.

POWER(x, y) returns the result of x raised to the power y.

Syntax

The syntax for the Oracle/PLSQL POWER function is:

POWER( m, n )

m is the base.

n is the exponent.

If m is negative, then n must be an integer.

Example


SQL> select power(2,3) from dual;
-- from  w ww  . j a v  a 2  s.c om
POWER(2,3)
----------
         8

SQL> select POWER(2, 1) from dual;

POWER(2,1)
----------
         2

SQL>

 POWER(-5, 3)
-------------
         -125