Skip to main content

SQRT

Returns the square root of a nonnegative number x.

Syntax

SQRT(x)

Arguments

ArgumentsDescription
xThe nonnegative numerical value.

Return Type

A Float64 data type value.

Examples

mysql> SELECT SQRT(4);
+---------+
| SQRT(4) |
+---------+
| 2 |
+---------+
1 row in set (0.00 sec)

mysql> SELECT SQRT(-16);
+-----------+
| SQRT(-16) |
+-----------+
| NaN |
+-----------+
1 row in set (0.00 sec)