ABS
ALL
AND
ANY
AVG
bit
COS
COT
DAY
EXP
GO
IN
LEN
LOG
MAX
MIN
NOT
OR
PI
SET
SIN
STR
SUM
TAN
USE
VAR
Expand Minimize
1 out of 1 rated this helpful - Rate this topic

SQUARE

SQL Server 2000

Returns the square of the given expression.

Syntax

SQUARE ( float_expression )

Arguments

float_expression

Is an expression of type float.

Return Types

float

Examples

This example returns the volume of a cylinder having a radius of 1 inch and a height of 5 inches.

DECLARE @h float, @r float
SET @h = 5
SET @r = 1
SELECT PI()* SQUARE(@r)* @h AS 'Cyl Vol'

Here is the result:

Cyl Vol
--------------------------
15.707963267948966

See Also

Mathematical Functions

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.