How to format number with "." as thousand separator, and "," as decimal separator?

Solution 1:

MySQL>=5.5:

SELECT FORMAT(10000000.5, 2, 'de_DE') AS format

MySQL<5.5:

SELECT REPLACE(REPLACE(REPLACE(FORMAT(10000000.5,2), ',', ':'), '.', ','), ':', '.') AS format

Solution 2:

specify locale.

FORMAT(myNumber, 2, 'de_DE')
  • SQLFiddle Demo