Returns m raised to the n_th power. _m, n can be any numeric value in the range of -1.797e308 <= m, n <= 1.797e308. Returns null if m = 0 and n < 0.
- If m = 0, n must be a non-negative value.
- If m < 0, n must be an integer value.
- The result of power(m, n) must be within the range expressed by a float64 number.
power({m},{n}) takes the following syntax.
SELECT power(M,N) as AliasName
FROM dataset;
Example
This example returns 2 raised to the 5th power.
SELECT power(2, 5) as powerExample FROM Superstore
LIMIT 1;
| powerExampe |
|---|
| 32.0 |