Outdated Version

You are viewing an older version of this section. View current production version.

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 |
+-------------------+