SQRT()

All functions > MATH > SQRT()

Returns the square root of a number.

Signatures

Square root

Returns: Square root of the input

SQRT(number: T) → DOUBLE
sql
ParameterTypeRequiredDescription
numberTYesNon-negative floating-point number

With:

  • T : Floating-point type (FLOAT, DOUBLE)

Signature notes:

  • Only defined for non-negative numbers
  • Returns NULL if the input is NULL
  • Returns NaN for negative inputs
  • To use with integers or decimals, cast explicitly (e.g. SQRT(2.0E0))

Examples

FeatureQL
SELECT
    f1 := SQRT(0.0E0), -- Square root of zero
    f2 := SQRT(1.0E0), -- Square root of one
    f3 := SQRT(4.0E0), -- Perfect square
    f4 := SQRT(25.0E0), -- Another perfect square
    f5 := SQRT(2.0E0) -- Irrational result
;
Result
f1 VARCHARf2 VARCHARf3 VARCHARf4 VARCHARf5 VARCHAR
0.01.02.05.01.4142135623730951

Last update at: 2026/05/26 17:22:09