Name

PI( )

Synopsis

PI( )

This function returns by default the first five decimal places of the number pi. You can adjust it to include more decimal places by adding a mask to the end of the function. There is no argument within the parentheses of the function.

SELECT PI( ), PI( )+0.0000000000;
+----------+-------------------+
| PI( )     | PI( )+0.0000000000 |
+----------+-------------------+
| 3.141593 |      3.1415926536 |
+----------+-------------------+

Get MySQL in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.