> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# POW

> Raises a base to an exponent.

<div className="e6-meta"><span className="e6-eyebrow e6-eyebrow--quiet">Scalar function</span></div>

**Aliases:** [`power`](/query/sql/functions/math/power)

Returns NULL when an argument is NULL.

## Syntax

### Scalar

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
pow(base, exponent)
```

## Arguments

| Name | Type | Required | Description |
| - | - | - | - |
| base | TINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, DOUBLE or DECIMAL(p, s) | Yes | The base value. For DECIMAL(p, s), p is precision (total digits) and s is scale (digits after the decimal point). |
| exponent | TINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, DOUBLE or DECIMAL(p, s) | Yes | The exponent. For DECIMAL(p, s), p is precision (total digits) and s is scale (digits after the decimal point). |

## Returns

* Type: DOUBLE for a converted floating base; the decimal base type for a decimal base
* Possible values: The numeric power represented in the return type.
* NULL behavior: Returns NULL when an argument is NULL.

## Properties

| Property | Value |
| - | - |
| Deterministic | Yes |
| Supports window usage | No |
| Exact result | No |

* Approximation bound: No fixed maximum error is guaranteed.

## Usage notes

* INTEGER and INT mean the same type; STRING means VARCHAR text. NULL can be used with a supported type. Cast NULL explicitly when its type would otherwise be unclear.
* Exact result: Floating-point computation can round the mathematical result.

## Examples

### Value and NULL input

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT pow(CAST(2 AS DOUBLE), CAST(3 AS DOUBLE)) AS "value", pow(CAST(NULL AS DOUBLE), CAST(3 AS DOUBLE)) AS null_value;
```

| value | null\_value |
| - | - |
| 8 | NULL |

### Negative and fractional exponents

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT pow(CAST(2 AS DOUBLE), CAST(-2 AS DOUBLE)) AS reciprocal, pow(CAST(9 AS DOUBLE), CAST(0.5 AS DOUBLE)) AS square_root;
```

| reciprocal | square\_root |
| - | - |
| 0.25 | 3 |

## Limitations

* Zero raised to a negative exponent raises an execution error.
* Decimal powers keep the base’s precision and scale. They can overflow, and calculations using floating point can round the result.
* A DECIMAL base produces a DECIMAL result with the same precision and scale, even when query tools report DOUBLE. Integer powers can raise an overflow error. Rescaling these powers discards extra fractional digits.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.