POWER
Returns the value of the specified expression to the specified power.
Syntax
POWER ( float_expression , y )
Arguments
float_expression
Is an expression of type float or of a type that can be implicitly converted to float.
y
Is the power to which to raise float_expression. y can be an expression of the exact numeric or approximate numeric data type category, except for the bit data type.
Return types
Returns the same type as float_expression except decimal(x, y) where decimal(x, 0) is returned.
Examples
DECLARE @input1 float; DECLARE @input2 float; SET @input1= 2; SET @input2 = 2.5; SELECT POWER(@input1, 3) AS Result1, POWER(@input2, 3) AS Result2;