Skip to main content

sqrt

sqrt

Description

Syntax:

DOUBLE sqrt(DOUBLE x)

This function returns the square root of x. x should be greater than or equal to 0.

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