how to format number with "." as thousand separator, and "," as decimal separator in MySql?
I'm using Format function like
Format
SELECT Format(myNumber,2) as myNumberFormatted FROM ...
But return type is a number like:
1,000,000.00
instead i want
1.000.000,00
How to do in MySQL ?
Thanks
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
2.1m questions
2.1m answers
60 comments
57.0k users