MySQL PI() Function

In MySQL, the PI() function returns the value of π with 6 decimal places.

Related functions: DEGREES(), RADIANS().

PI() Syntax

Here is the syntax of MySQL PI() function:

PI()

Note: The PI() function returns the value with 6 decimal places. However, MySQL maintains a double-precision value internally.

PI() Examples

SELECT
    PI(),
    PI() + 0.000000000000000,
    PI() * 10000000000000000\G

output

*************************** 1\. row ***************************
                    PI(): 3.141593
PI() + 0.000000000000000: 3.141592653589793
PI() * 10000000000000000: 31415926535897932.000000