POWER()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Returns the value of the first argument raised to the power of the second argument.
USAGE
POWER(base, exponent)
Argument Name | Description |
---|---|
| The numeric base |
| The numeric exponent |
DETAILS
POWER()
is a mathematical function that returns the value of the base raised to the indicated exponent power. Both base and exponent should be real numbers.
The return value must fit within the DOUBLE
data type or an error is generated.
A NULL
is returned if either arguments is NULL
.
EXAMPLES
SELECT POWER(2, 3), POWER(1, -2);
+-------------+--------------+
| POWER(2, 3) | POWER(1, -2) |
+-------------+--------------+
| 8 | 1 |
+-------------+--------------+