Skip to main content

SQRT

Description​

Returns the square root of a value, where the input value must be greater than or equal to 0.

Aliases​

  • DSQRT

Syntax​

SQRT(<a>)

Parameters​

ParameterDescription
<a>The value whose square root is to be calculated

Return Value​

The square root of parameter a.

Examples​

select sqrt(9),sqrt(2)
+-------------------------+-------------------------+
| sqrt(cast(9 as DOUBLE)) | sqrt(cast(2 as DOUBLE)) |
+-------------------------+-------------------------+
| 3.0 | 1.4142135623730951 |
+-------------------------+-------------------------+