문제

i have simple mysql query

select count(total_profit)as profit from sales_profits

i get some thing like this as result profit=25000000000. What i want is some like this profit=25,000,000,000, is there some way by which we can do it in MYSQL?

도움이 되었습니까?

해결책

Try with

SELECT FORMAT(COUNT(total_profit), 0) AS profit 
FROM sales_profits

다른 팁

Format function as answered in here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top