Returns the square of a specified value expressed as a float.
square(numeric_expression)
is a numeric expression of type float.
Returns the square from an integer column:
select square(total_sales)from titles ------------ 16769025.00000 15023376.00000 350513284.00000 ... 16769025.00000 (18 row(s) affected)
Returns the square from a money column:
select square(price) from titles ----------- 399.600100 142.802500 8.940100 NULL ... 224.700100 (18 row(s) affected)
This function is the equivalent of power(numeric_expression,2), but it returns type float rather than int.
ANSI SQL – Compliance level: Transact-SQL extension.
Any user can execute square.
Functions power