跳到主要内容

sqrt

sqrt

description

Syntax

DOUBLE sqrt(DOUBLE x) 返回x的平方根,要求x大于或等于0.

提示

该函数的另一个别名为 dsqrt

example

mysql> select sqrt(9);
+-----------+
| sqrt(9.0) |
+-----------+
| 3 |
+-----------+
mysql> select sqrt(2);
+--------------------+
| sqrt(2.0) |
+--------------------+
| 1.4142135623730951 |
+--------------------+
mysql> select sqrt(100.0);
+-------------+
| sqrt(100.0) |
+-------------+
| 10 |
+-------------+

keywords

SQRT, DSQRT