POW()

All functions > MATH > POW()

Returns a number raised to the power of another number.

Signatures

Power

Returns: Base raised to the power of exponent

POW(base: T, exponent: T) → T
sql
ParameterTypeRequiredDescription
baseTYesThe base number
exponentTYesThe exponent

With:

  • T : Any numeric type

Signature notes:

  • Both arguments must be the same numeric type (both integer or both floating-point)
  • POW(x, 0) = 1 for any non-zero x
  • POW(0, y) = 0 for positive y
  • Returns NULL if either input is NULL
  • Alias: POWER

Aliases

  • POWER

Related operators

Examples

POW(...)

FeatureQL
SELECT
    f1 := POW(2, 3) -- Function call
;
Result
f1 BIGINT
8

.POW(...) — chained

FeatureQL
SELECT
    f1 := (2).POW(3), -- Integer literal: parenthesize for `.POW` on BIGINT
    f2 := 2E0.POW(3E0) -- DOUBLE operands: chain without extra parentheses (same-type floating-point power)
;
Result
f1 BIGINTf2 VARCHAR
88.0

Edge cases

FeatureQL
SELECT
    f1 := POW(5, 2), -- Square
    f2 := POW(10, 0), -- Exponent zero
    f3 := POW(2.0E0, -2.0E0), -- Negative exponent (DOUBLE)
    f4 := POW(4.0E0, 0.5E0) -- Fractional exponent (DOUBLE)
;
Result
f1 BIGINTf2 BIGINTf3 VARCHARf4 VARCHAR
2510.252.0

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