我在使用 SQLSUM()函数时遇到了这个问题,我有三个总和等于零的值,如您所见,但使用该SUM()函数,答案是奇怪的值,如图所示。
Select Qty from Stock where ProductCode = '5LINE-15-1-30RU'
Output :
1. 49.72
2. -31.065
3. -18.655
Select SUM(Qty) from Stock where ProductCode = '5LINE-15-1-30RU'
Output :
-3.5527136788005E-15
Run Code Online (Sandbox Code Playgroud)
结果必须是 0 但我得到了这个尴尬的值。
列Qty是一个float.