Function Reference

PI

Returns the value of π.

MySQL 8.1
PI()

Return value

The number π (DOUBLE)

Examples

Value of π

MySQL 8.1
SELECT PI();
PI()
3.141593

Full precision of π

MySQL 8.1
SELECT PI() + 0.000000000000000;
PI() + 0.000000000000000
3.141592653589793

Details

Output shows 6 decimal places, but calculations use full precision.

See also