Skip to content

Latest commit

 

History

History
70 lines (49 loc) · 1.61 KB

File metadata and controls

70 lines (49 loc) · 1.61 KB
description
Returns the square root of the non-negative numeric expression.

SQRT

Syntax

SQRT(numeric_expression double) → double

  • numeric_expression: Numeric expression to calculate the square root for.

Examples

{% code title="SQRT example" %}

SELECT SQRT(25.25)
-- 5.024937810560445

{% endcode %}

{% code title="SQRT example" %}

SELECT SQRT(-25.25)
-- NaN

{% endcode %}

SQRT(numeric_expression int64) → int64

  • numeric_expression: Numeric expression to calculate the square root for.

Examples

{% code title="SQRT example" %}

SELECT SQRT(25)
-- 5

{% endcode %}

SQRT(numeric_expression int32) → int32

  • numeric_expression: Numeric expression to calculate the square root for.

Examples

{% code title="SQRT example" %}

SELECT SQRT(25)
-- 5

{% endcode %}

SQRT(numeric_expression float) → float

  • numeric_expression: Numeric expression to calculate the square root for.

Examples

{% code title="SQRT example" %}

SELECT SQRT(25.25)
-- 5.024937810560445

{% endcode %}

Usage Notes

If the input is a non-negative value, NaN will be returned.