MySQL PI Function

This MySQL function is useful for returning the Pi value, which is 3.141593, and it lets us see how to find it. Next, how can we use this function as an argument for another function with an example?

The basic syntax of the PI is as shown below:

PI()

PI Function Example

The first statement returns the actual value. Also, read about the MySQL RAND function.

In the second MySQL statement, we are adding 10 to the value. Within the third statement, we used this Mathematical method inside COS, SIN, and TAN functions.

TIP: Please refer to the MySQL MOD and MySQL CRC32 functions from the available list of MySQL Numeric Functions.

SELECT PI();

SELECT PI() + 10 ;

SELECT COS(PI()), SIN(PI()), TAN(PI());
PI Function Example