SQRT

The SQRT function returns the square root of a number.

Read syntax diagramSkip visual syntax diagram
>>-SQRT--(--expression--)--------------------------------------><

expression
An expression that returns a value of any built-in numeric, character-string, or graphic-string data type. A string argument is converted to double-precision floating point before evaluating the function. For more information about converting strings to double-precision floating point, see DOUBLE_PRECISION or DOUBLE. The value of expression must be greater than or equal to zero.

If the argument is DECFLOAT(n), the result is DECFLOAT(n). Otherwise, the result of the function is a double precision floating-point number. If the argument is a special decimal floating point value, the general rules for arithmetic operations apply. See General arithmetic operation rules for DECFLOAT for more information. If the argument can be null, the result can be null; if the argument is null, the result is the null value.

Example