MySQL - Number format - Separated with Comma I have a query of MySQL like this-

SELECT avg('total_cost') FROM 'employee'


And then I am getting output like this-

1254589687.26587952


But I like to have a output like this-

1,25,45,89,687.26


So, a comma separator should be added and number should be rounded.

Is there any way in MySQL?

Thanks for helping.
+----------------------------------+
| format(123456789.26, 2, 'ta_in') |
+----------------------------------+
| 12,34,56,789.26                  |
+----------------------------------+


http://dev.mysql.com/doc/refman/5.6/en/string-functions.html#function_format
http://dev.mysql.com/doc/refman/5.6/en/locale-support.html -- locales