MySQL Tutorial/Math Numeric Functions/POW

Материал из SQL эксперт
Перейти к: навигация, поиск

POW(X,Y), POWER(X,Y) returns the value of X raised to the power of Y.

   <source lang="sql">

mysql> mysql> SELECT POW(2,2); +----------+ | POW(2,2) | +----------+ | 4 | +----------+ 1 row in set (0.02 sec) mysql> mysql> SELECT POW(2,-2); +-----------+ | POW(2,-2) | +-----------+ | 0.25 | +-----------+ 1 row in set (0.00 sec) mysql></source>