SQL/MX 2.x Reference Manual (G06.24+, H06.03+)
SQL/MX Functions and Expressions
HP NonStop SQL/MX Reference Manual—523725-004
9-107
POWER Function
POWER Function
The POWER function returns the value of a numeric value expression raised to the
power of an integer value expression. You can also use the exponential operator **.
POWER is an SQL/MX extension.
numeric-expression-1,numeric-expression-2
are SQL numeric value expressions that specify the values for the base and
exponent arguments of the POWER function. See Numeric Value Expressions on
page 6-50.
If base numeric-expression-1 is zero, the exponent numeric-
expression-2 must be greater than zero, and the result is zero. If the exponent
is zero, the base cannot be 0, and the result is 1. If the base is negative, the
exponent must be a value with an exact numeric data type and a scale of zero.
Examples of POWER
•
Return the value 15.625:
POWER (2.5,3)
•
Return the value 27. The function POWER raised to the power of 2 is the inverse
of the function SQRT:
POWER (SQRT(27),2)
POWER (numeric-expression-1,numeric-expression-2)