Oracle Plsql Power Function

Oracle / PLSQL: POWER Function

This Oracle tutorial explains how to use the Oracle/PLSQL POWER function with syntax and examples.

Description

The Oracle/PLSQL POWER function returns m raised to the nth power.

Syntax

The syntax for the POWER function in Oracle/PLSQL is:

POWER( m, n )

Parameters or Arguments

m

The base used in the calculation.

n

The exponent used in the calculation.

Returns

The POWER function returns a numeric value.

Note

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

Applies To

The POWER function can be used in the following versions of Oracle/PLSQL:

  • Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i

Example

Let's look at some Oracle POWER function examples and explore how to use the POWER function in Oracle/PLSQL.

For example:

POWER(3, 2)
Output: 9

POWER(5, 3)
Output: 125

POWER(-5, 3)
Output: -125

POWER(6.2, 3)
Output: 238.328

POWER(6.2, 3.5)
Output: 593.431934277892