跳转到主要内容

POW

Returns the value of x raised to the power of y.

POWER() is a synonym for POW().

Syntax

POW(x, y)
POWER(x, y)

Arguments

ArgumentsDescription
xThe numerical value.
yThe numerical value.

Return Type

A Float64 data type value.

Examples

SELECT POW(-2,2);
+---------------+
| POW((- 2), 2) |
+---------------+
| 4 |
+---------------+

SELECT POW(2,-2);
+---------------+
| POW(2, (- 2)) |
+---------------+
| 0.25 |
+---------------+

SELECT POWER(-2, 2);
+--------------+
| POWER(-2, 2) |
+--------------+
| 4 |
+--------------+