ID EN
Mathematical Functions

PI()

MySQL 8.4 🇮🇩 Bahasa Indonesia

Mengembalikan nilai π (pi). Jumlah default tempat desimal yang ditampilkan adalah tujuh, namun MySQL menggunakan nilai presisi ganda penuh secara internal.

Syntax

MYSQL
SELECT PI();
3.141593
SELECT PI()+0.000000000000000000;
3.141592653589793000

Contoh

Example

Because the return value of this function is a double-precision value, its exact representation may vary between platforms or implementations. This also applies to any expressions making use of PI(). See Section 13.1.4, “Floating-Point Types (Approximate Value) - FLOAT, DOUBLE”.

MYSQL
SELECT PI();
3.141593
SELECT PI()+0.000000000000000000;
3.141592653589793000