Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 966 Bytes

File metadata and controls

46 lines (35 loc) · 966 Bytes
description
Returns the result of raising the input value to the specified power.

POWER

Syntax

POWER(numeric_expression double, power double) → double

  • numeric_expression: The input expression.
  • power: The power to raise the numeric_expression to.

Examples

{% code title="POWER example" %}

SELECT POWER(5, 2)
-- 25.0

{% endcode %}

{% code title="POWER example" %}

SELECT POWER(0.1, 2)
-- 0.010000000000000002

{% endcode %}

{% code title="POWER example" %}

SELECT POWER(-2, 2)
-- 4.0

{% endcode %}

{% code title="POWER example" %}

SELECT POWER(10, -2)
-- 0.01

{% endcode %}

Usage Notes

This function always returns a DOUBLE even if the parameters are both integers.