我有一个看起来像这样的表,使用format()我可以把(,)放在我的平衡,存款和取款表上,这些都是小数。
| begbalance | deposit | withdraw |
SELECT format(begbalance,2)begbalance,
format(deposit,2)deposit,
format(withdraw,2)withdraw,
begbalance+deposit+withdraw AS balance
FROM savingstable;
我的问题是我无法使用format()平衡,我想把逗号(,)平衡。有什么建议吗?提前谢谢
答案 0 :(得分:1)
format(begbalance+deposit+withdraw, 2) as balance