MySQL format()函數
FORMAT(X,D)
FORMAT() 函數用於以下格式格式化數字X:###,###,###。##截斷為D位小數。下麵的例子演示Format()函數的使用和輸出:
mysql>SELECT FORMAT(423423234.65434453,2); +---------------------------------------------------------+ | FORMAT(423423234.65434453,2) | +---------------------------------------------------------+ | 423,423,234.65 | +---------------------------------------------------------+ 1 row in set (0.00 sec)