--- title: "SQUARE (Transact-SQL) | Microsoft Docs" ms.custom: "" ms.date: "03/03/2017" ms.prod: "sql" ms.prod_service: "sql-data-warehouse, pdw, sql-database" ms.service: "" ms.component: "t-sql|functions" ms.reviewer: "" ms.suite: "sql" ms.technology: - "database-engine" ms.tgt_pltfrm: "" ms.topic: "language-reference" f1_keywords: - "SQUARE" - "SQUARE_TSQL" dev_langs: - "TSQL" helpviewer_keywords: - "SQUARE" - "square values" ms.assetid: 007b6b12-da86-4229-8f5c-fdd4fa839f5f caps.latest.revision: 20 author: "edmacauley" ms.author: "edmaca" manager: "craigg" ms.workload: "On Demand" monikerRange: ">= aps-pdw-2016 || = azure-sqldw-latest || >= sql-server-2016 || = sqlallproducts-allversions" --- # SQUARE (Transact-SQL) [!INCLUDE[tsql-appliesto-ss2008-xxxx-asdw-pdw-md](../../includes/tsql-appliesto-ss2008-xxxx-asdw-pdw-md.md)] Returns the square of the specified float value. ![Topic link icon](../../database-engine/configure-windows/media/topic-link.gif "Topic link icon") [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md) ## Syntax ``` SQUARE ( float_expression ) ``` ## Arguments *float_expression* Is an [expression](../../t-sql/language-elements/expressions-transact-sql.md) of type **float** or of a type that can be implicitly converted to float. ## Return Types **float** ## Examples The following 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'; ``` [!INCLUDE[ssResult](../../includes/ssresult-md.md)] ``` Cyl Vol -------------------------- 15.707963267948966 ``` ## Examples: [!INCLUDE[ssSDWfull](../../includes/sssdwfull-md.md)] and [!INCLUDE[ssPDW](../../includes/sspdw-md.md)] The following example returns the square of each value in the `volume` column in the `containers` table. ``` -- Uses AdventureWorks CREATE TABLE Containers ( ID int NOT NULL, Name varchar(20), Volume float(24)); INSERT INTO Containers VALUES (1, 'Cylinder', '125.22'); INSERT INTO Containers VALUES (2, 'Cube', '23.98'); SELECT Name, SQUARE(Volume) AS VolSquared FROM Containers; ``` [!INCLUDE[ssResult](../../includes/ssresult-md.md)] ``` Name VolSquared ------------- ---------- Cylinder 15680.05 Cube 575.04 ``` ## See Also [Mathematical Functions (Transact-SQL)](../../t-sql/functions/mathematical-functions-transact-sql.md)