It is unclear which of the columns you want to apply formatting to, so I’ll show you a generic shape:
SELECT FORMAT(12332.2, 2,'pt_BR');
The result is 12332,20
. (Without the points)
Reference: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html#function_format
Explaining better
The first parameter is the value, the second is the number of decimals. The third is optional, where you can set the locality.
In the example I applied the site to Brazilian Portuguese.
In your case I assume it would look like this:
FORMAT(SUM(saida_caixa), 2,'pt_BR') AS total
Suggestion
I don’t know where you want to display the data, but if you are going to display it on an HTML page, I suggest thinking about leaving the processing cost to the client, with Javascript. See this link: /a/81554/4793
I emphasize that it is a superficial suggestion and does not mean that it is the best form nor the only one. The best form depends on each case.
The result is without the point.
– Gato de Schrödinger
If the locale
pt_BR
does not work you can try with thede_DE
, in this test here seems to me equivalent to the format pt_BR, at least in number formatting.– Icaro Martins