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
    -- Function call
    f1 := POW(2, 3)
;
Result
f1 BIGINT
8

.POW(...) — chained

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

Edge cases

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

Last update at: 2026/06/20 10:08:10