Raises one number to the power of a second number.

Syntax

POWER(expression, power)

Arguments

  • expression - a numeric value of type DOUBLE.
  • power - a numeric value of type INTEGER.

Returns

A DOUBLE value.

Examples

SELECT numberCol, POWER(numberCol, 2) AS numberColSquared FROM MYSQL.inventory.cust;

-- POWER(3,2)
-- Returns 9