MySQL 8.4
POW(num, power)- num
- BaseDOUBLE
- power
- Exponent, can be fractional or negativeDOUBLE
Return value
A floating-point number (DOUBLE); an error if the result is undefined or too large: POW(0, -1), POW(-8, 1 / 3)
Examples
Square of a number
MySQL 8.4
SELECT POW(2, 2);Negative exponent
MySQL 8.4
SELECT POW(2, -1);Fractional exponent
MySQL 8.4
SELECT POW(9, 0.5);Details
POWER is a synonym for POW.