POWER
Returns the result of expr raised to the power of power.
Syntax
sql
POWER(expr,power)Arguments
expr can be any numeric data type or any non-numeric data type that can be implicitly converted to a numeric data type.
If expr < 0, power must be an integer.
Return Values
The return value is of the DECIMAL data type.
Example
sql
SELECT power(3, 2),
power(9, 0.5),
power(exp(1),ln(exp(1))),
power(-4,2),
power('-5',2);+-------------+---------------+--------------------------+-------------+---------------+
| POWER(3, 2) | POWER(9, 0.5) | POWER(EXP(1),LN(EXP(1))) | POWER(-4,2) | POWER('-5',2) |
+-------------+---------------+--------------------------+-------------+---------------+
| 9 | 3 | 2.71828 | 16 | 25 |
+-------------+---------------+--------------------------+-------------+---------------+