title: "PI (Transact-SQL) | Microsoft Docs" ms.custom: "" ms.date: "03/03/2017" ms.prod: "sql" ms.prod_service: "database-engine, sql-database, sql-data-warehouse, pdw" 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:
- "PI_TSQL"
- "PI" dev_langs:
- "TSQL" helpviewer_keywords:
- "constant value of PI"
- "PI function" ms.assetid: d7c4575b-ba1c-4ef7-a633-9a379d7f01fd caps.latest.revision: 31 author: "edmacauley" ms.author: "edmaca" manager: "craigg" ms.workload: "Inactive" monikerRange: ">= aps-pdw-2016 || = azuresqldb-current || = azure-sqldw-latest || >= sql-server-2016 || = sqlallproducts-allversions"
[!INCLUDEtsql-appliesto-ss2008-all-md]
Returns the constant value of PI.
Transact-SQL Syntax Conventions
PI ( )
float
The following example returns the value of PI.
SELECT PI();
GO
[!INCLUDEssResult]
------------------------
3.14159265358979
(1 row(s) affected)