Kategorien:

Numerische Funktionen (Exponent und Wurzel)

POW, POWER

Gibt eine Zahl (x) zurück, die auf die angegebene Leistung (y) angehoben wurde.

Syntax

POW(x, y)

POWER (x, y)
Copy

Returns

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

Beispiele

SELECT x, y, pow(x, y) FROM tab;

-----+-----+-------------+
  X  |  Y  |  POW(X, Y)  |
-----+-----+-------------+
 0.1 | 2   | 0.01        |
 2   | 3   | 8           |
 2   | 0.5 | 1.414213562 |
 2   | -1  | 0.5         |
-----+-----+-------------+
Copy