《MYSQL數據庫mysql格式化小數保留小數點后兩位(小數點格式化)》要點:
本文介紹了MYSQL數據庫mysql格式化小數保留小數點后兩位(小數點格式化),希望對您有用。如果有疑問,可以聯系我們。
結果:12,562.67MYSQL學習
查看文檔:Formats the number X to a format like '#,###,###.##', rounded to D decimal places, and returns the result as a string. If D is 0, the result has no decimal point or fractional part.整數部分超過三位的時候以逗號分割,并且返回的結果是string類型的.MYSQL學習
沒有達到預期結果,想要的結果不要以逗號分隔,MYSQL學習
結果:4545.13,直接截取不四舍五入,還是有問題.MYSQL學習
結果:4545.14,達到預期.MYSQL學習
轉載請注明本頁網址:
http://www.snjht.com/jiaocheng/5022.html