On this page

    Categories: Math

    SQRT

    Returns the square root of the non-negative numeric expression.

    Syntax

    SQRT(numeric_expression double) → double

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

    Examples

    SQRT example
    SELECT SQRT(25.25)
    -- 5.024937810560445
    
    SQRT example
    SELECT SQRT(-25.25)
    -- NaN
    

    SQRT(numeric_expression int64) → int64

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

    Examples

    SQRT example
    SELECT SQRT(25)
    -- 5
    

    SQRT(numeric_expression int32) → int32

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

    Examples

    SQRT example
    SELECT SQRT(25)
    -- 5
    

    SQRT(numeric_expression float) → float

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

    Examples

    SQRT example
    SELECT SQRT(25.25)
    -- 5.024937810560445
    

    Usage Notes

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