POWER()

Documentation

VoltDB Home » Documentation » Using VoltDB

POWER()

POWER() — Returns the value of the first argument raised to the power of the second argument.

Synopsis

POWER( numeric-expression, numeric-expression )

Description

The POWER() function takes two numeric expressions and returns the value of the first raised to the power of the second. In other words, POWER(x,y) is the equivalent of the mathematical expression xy.

Example

The following example uses the POWER function to return the surface area and volume of a cube.

SELECT length, 6 * POWER(length,2) AS surface,
       POWER(length,3) AS volume FROM Cube
      ORDER BY length;