MySQL POWER() function
MySQL POWER() returns the value of a number raised to the power of another number. The synonym of POWER() is POW().
This function is useful in -
- POWER() is essential for modeling phenomena involving exponential growth or decay, such as compound interest, population growth, radioactive decay, and more.
- POWER() is a key component in many scientific formulas, especially those that involve exponential relationships.
- In finance, POWER() is crucial for calculating compound interest and determining future values of investments.
- To compute the power of a signal the POWER() is fundamental in telecommunications, audio processing, image processing, and other fields where signal analysis is essential.
- POWER() is utilized in probability and statistics for various calculations, including likelihood ratios, likelihood functions, and power functions in hypothesis testing.
- In thermodynamics and heat transfer, POWER() is applied to model temperature distributions, heat transfer rates, and other phenomena involving exponential relationships.
|M||A number which is the base of the exponentiation.|
|N||A number which is the exponent of the exponentiation.|
MySQL Version: 8.0
Pictorial presentation of MySQL POWER() function
Example of MySQL POWER() function
SELECT POWER(3, 2);
The above MySQL statement returns the value of 32, i.e. 9.
mysql> SELECT POWER(3, 2); +-------------+ | POWER(3, 2) | +-------------+ | 9 | +-------------+ 1 row in set (0.00 sec)
Example : POWER() function with negative value
The above MySQL statement returns the value of 4-2, i.e. 0.0625.
mysql> SELECT POWER(4,-2); +-------------+ | POWER(4,-2) | +-------------+ | 0.0625 | +-------------+ 1 row in set (0.00 sec)
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join
We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook