SQUARE (Transact-SQL)

Gibt das Quadrat des angegebenen float-Wertes zurück.

Themenlink (Symbol)Transact-SQL-Syntaxkonventionen

Syntax

SQUARE ( float_expression )

Argumente

  • float_expression
    Ist ein Ausdruck vom Typ float oder der einem Typ entspricht, der implizit in den Datentyp float konvertiert werden kann.

Rückgabetypen

float

Beispiele

Im folgenden Beispiel wird das Volumen eines Zylinders mit einem Radius von 1 Zoll und der Höhe von 5 Zoll zurückgegeben.

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

Dies ist das Resultset.

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

Siehe auch

Verweis

Mathematische Funktionen (Transact-SQL)

Hilfe und Informationen

Informationsquellen für SQL Server 2005