SQRT
Returns the square root of a numeric expression.
Syntax
SQRT(<value>);
Parameters
Parameter | Description | Supported input types |
---|---|---|
<value> | Value that the SQRT function is applied to | DOUBLE PRECISION |
Notes
- When input value is integer data type, it is implicitly converted to
DOUBLE PRECISION
. - When input value is
NUMERIC
, theSQRT
function returns an error. - When input value is negative, the
SQRT
function returns an error.
Return Types
DOUBLE PRECISION
.
Example
The following example returns the square root of 64
:
SELECT
SQRT(64);
Returns: 8