POWER¶
The POWER function is used to raise a number to the power of another number. It takes two arguments, the base and the exponent, both of which must be of the FLOAT type. The result will also be of the FLOAT type.
Syntax¶
Examples¶
- Using the
POWERfunction:
- Using the
POWERfunction with a decimal:
- Using the
POWERfunction with zero:
SELECT POWER(0, 4) as power_with_zero;
-- Result: 0.0
SELECT POWER(3, 0) as power_to_zero;
-- Result: 1.0
Error Cases¶
- The
POWERfunction requires both arguments to be of FLOAT type:
- The
POWERfunction requires the base to be of FLOAT type:
- The
POWERfunction requires the exponent to be of FLOAT type: