Explain PI() Function in SQL?

PI() function :

This function in SQL Server is used to return the constant float value of math Pi. The default number of decimal places displayed is seven, but SQL Server uses the full double-precision value internally.

Features :

  • This function is used to get the value of pi.
  • This function does not accept any parameters.
  • Any types of mathematical operations can be done with this function such as addition, multiplication etc.

Syntax :


Parameter : This method does not accept any parameter.

Returns : It returns the Pi value.


Getting the default value of pi.


Output :