Format currency amount using Indian numeral separator in MySQL
You are looking for Indian numeral separators (lakhs, crores). We can use Format()
function, with third parameter set to en_IN
(English - India) locale. Second parameter is set to 2 for specifying 2 decimal places after decimal point .
. Finally, the CONCAT('Rs. ') adds the currency to the result.
select CONCAT('Rs. ', FORMAT(sum(netamount), 2, 'en_IN'))
from syncbill
Demo
select format(100000,2,'en_IN');
| format(100000,2,'en_IN') |
| ------------------------ |
| 1,00,000.00 |
View on DB Fiddle
Edit: However, as discussed further in comments, your MySQL server version is significantly old (5.1) and it does not support Format()
function with Locale parameter. Check 5.1 documentation here.