POWER (TSQL Function)

Returns the first argument raised to the specified power.

Syntax

POWER ( numeric_expression , power )

Arguments

numeric_expression
is a numeric expression of type int, bigint, money, numeric, float.
power
is the exponent to which numeric_expression is raised. It is of type float.

Return Types

Returns the same type as numeric_expression.

Remarks

Internally, numeric_expression is converted to float, raised to power, and the result is converted back to the type of numeric_expression.

Examples

PRINT POWER(2, 4), POWER(123.45, 4.5);

The result is:

         16|              2580536012.437853245757|
RSQL, a simple alternative to Microsoft SQL Server