KnowledgeBoat Logo

Informatics Practices

Explain the POWER() SQL function using suitable examples.

SQL Queries

2 Likes

Answer

The POWER()/POW() function returns the value of m raised to the nth power, denoted as mn. The syntax is POWER(m, n) or POW(m, n). Both m and n can be any numbers, but if m is negative, n must be an integer. For example,

SELECT POWER(4, 2) "Raised";
Output
+--------+
| Raised |
+--------+
|     16 |
+--------+

Answered By

2 Likes


Related Questions