Kategorien:

Numerische Funktionen (Exponent und Wurzel)

SQRT

Gibt die Quadratwurzel eines nicht-negativen numerischen Ausdrucks zurück.

Syntax

SQRT(expr)
Copy

Returns

If the input expression is of type DECFLOAT, the returned type is DECFLOAT. Otherwise, the returned type is FLOAT.

Beispiele

SELECT x, sqrt(x) FROM tab;

--------+-------------+
   x    |   sqrt(x)   |
--------+-------------+
 0      | 0           |
 2      | 1.414213562 |
 10     | 3.16227766  |
 [NULL] | [NULL]      |
--------+-------------+
Copy