SqlExpression POWER
From Eigenpedia
Contents |
Syntax
POWER( base, exponent )
Note: in version 0.7.4 and earlier, this function was mistakenly named POW. It is being renamed to POWER to match SQL:2003.
Purpose
Returns the value of base raised to the power of exponent
Input
- base - the base number of the exponential
- exponent - the exponent of the exponential, power to be raised to
Output
- [NUMERIC] - the exponential (base raised to the power exponent), returns null on null input. An exception is thrown if base is zero and exponent is negative or if base is negative and exponent is not a whole number.
Example
| Function | Result |
|---|---|
| POWER(2, -2) | 0.25 |
| POWER(cast (null as integer), 2) | |
| POWER(1.34, 2.3) | 1.9603834897007615 |

