错误答案MySQL SUM

时间:2019-06-02 04:13:47

标签: mysql sum

我有一个表Credit Dated AccName Credit。我想在tbtransaction TransactionID AccName Credit Dated ----------------------------------------------------------- 1 CASH ACCOUNT 8,850,890 2019-03-31 2 CASH ACCOUNT 119,870 2019-03-31 3 CASH ACCOUNT 4,400 2019-03-31 4 CASH ACCOUNT 2,090 2019-03-31 5 CASH ACCOUNT 700 2019-03-31 6 CASH ACCOUNT 600 2019-03-31 7 CASH ACCOUNT 300 2019-03-31 列中获取总和值。这在本地主机上工作的一些价值。但是在线服务器返回错误的总和值。

SELECT SUM(Credit) as debitbalance FROM tbtransaction  WHERE AccName='CASH ACCOUNT'
 and Dated BETWEEN '2019-03-31' AND '2019-03-31'ORDER BY TransactionID ASC

我的查询

8978850

和值8978852的正确值进入locallhost 但在线服务器获取 this.connected.on('open', () => { this.wsChannel = ws.subscribe('dyno:audits') this.wsChannel.on('error', console.log) })

我的代码有什么问题

0 个答案:

没有答案