POW() Function in MySQL
POW() function :
This function in MySQL is used to return a results after raising a specified exponent number to a specified base number. For example if the base is 5 and exponent is 2, this will return a result of 25.
Syntax :
SELECT POW(x, y);
Parameter :
This method accepts two parameters as given below as follows.
- x –
Specified base number. - y –
Specified exponent number.
Returns :
It returns a results after raising a specified exponent number to a specified base number.
Example-1 :
Getting a result of 49 for the base value 7 and exponent value 2.
SELECT POW(7, 2);
Output :
49
Example-2 :
Getting a result of 27 for 3 as the base and exponent value.
SELECT POW(3, 3);
Output :
27
Example-3 :
Getting a result of 1 for the base value 6 and exponent value 0.
SELECT POW(6, 0);
Output :
1
Example-4 :
Getting a result of 0 for the base value 0 and exponent value 4.
SELECT POW(0, 4);
Output :
0
Application :
This function is used to return a results after raising a specified exponent number to a specified base number.