PI (Transact-SQL)

 

THIS TOPIC APPLIES TO: yesSQL Server (starting with 2008)yesAzure SQL DatabaseyesAzure SQL Data Warehouse yesParallel Data Warehouse

Returns the constant value of PI.

Topic link icon Transact-SQL Syntax Conventions

-- Syntax for SQL Server, Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse  
  
PI ( )  

float

The following example returns the value of PI.

SELECT PI();  
GO  

Here is the result set.

------------------------  
3.14159265358979  
  
(1 row(s) affected)  

The following example returns the value of PI.

SELECT PI();  
GO  

Here is the result set.

------------------------  
3.14159265358979  
  
(1 row(s) affected)  

Mathematical Functions (Transact-SQL)

Community Additions

ADD
Show: