MySQL Tutorial/Math Numeric Functions/SQRT

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

SQRT(-16);

   <source lang="sql">

mysql> mysql> SELECT SQRT(-16); +-----------+ | SQRT(-16) | +-----------+ | NULL | +-----------+ 1 row in set (0.00 sec) mysql></source>


SQRT(X) returns the square root of a non-negative number X.

   <source lang="sql">

mysql> mysql> SELECT SQRT(4); +---------+ | SQRT(4) | +---------+ | 2 | +---------+ 1 row in set (0.00 sec) mysql> mysql> SELECT SQRT(20); +-----------------+ | SQRT(20) | +-----------------+ | 4.4721359549996 | +-----------------+ 1 row in set (0.00 sec) mysql></source>