Calculate and return the square of 4.
SELECT POWER(4, 2); |
The POWER() function computes a number raised to the power of another number and returns the result.
POWER(a, b) |
Parameter |
Description |
a |
Required: A numeric value representing the base number. |
b |
Required: A numeric value representing the exponent. |
Works in: |
SQL Server (beginning from 2008), Azure SQL Database, Azure SQL Data Warehouse, and Parallel Data Warehouse |
Calculate and return the result of raising 8 to the power of 3.
SELECT POWER(8, 3); |