Published May 23, 2023
Contribute to Docs
POWER() function in SQL is a mathematical function that returns the value of a number raised to the power of another number. It is compatible with various SQL database systems such as MySQL, PostgreSQL, Oracle, and SQL Server.
SELECT POWER(base, exponent)FROM table_name;
In this example the following data is given in the table
POWER() function can be used to calculate the result:
SELECT base_number, exp_number, POWER(base_number, exp_number) AS power_numberFROM numbers;
The output will be:
Looking to contribute?
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn SQL on Codecademy
Analyze Data with SQLLearn to analyze data with SQL and prepare for technical interviews.
Includes 8 Courses