Watch the 7.3 Webinar On-Demand
This new release brings updates to Universal Storage, query optimization, and usability that you won’t want to miss.

POW

Returns the given number exponentiated to the given power.

Syntax

POW ( number, power )
POWER ( number, power )

Arguments

  • expression: any valid numeric expression.
  • power: any valid numeric expression.

Return Type

Float or double. If either argument is null, returns NULL.

Examples

select pow(2, 8);
+-----------+
| pow(2, 8) |
+-----------+
|       256 |
+-----------+

select pow(2, 16);
+------------+
| pow(2, 16) |
+------------+
|      65536 |
+------------+

select pow(2, 24);
+------------+
| pow(2, 24) |
+------------+
|   16777216 |
+------------+

select pow(2, 2.5);
+-------------------+
| pow(2, 2.5)       |
+-------------------+
| 5.656854249492381 |
+-------------------+