Formats a number with thousands separators and a specified number of decimal places. Useful for displaying numbers in a human-readable format.
VARCHARDiperbarui: 13 Jun 2026FORMAT(num, decimal_places[, locale])The number to format
Number of decimal digits
Locale for formatting (optional)
1 SELECT FORMAT(1234567.89, 2) AS formatted;
Format with 2 decimal places.
1 SELECT FORMAT(1234567.89, 0) AS formatted;
Format with no decimal places (rounded).
1 SELECT FORMAT(1234567.89, 2, 'de_DE') AS german_format;
German format (dot as thousands separator, comma as decimal separator).
Sudah paham FORMAT? Latih langsung di browser
Latihan interaktif, langsung di browser.