我正在使用psql(9.1.3)。我有一个表(比如说)postgres查询不匹配负双精度值
一个有两列:
A_ID:整数
customer_pay:双精度
我的是这些值表。
a_id | customer_pay |
-------------------- + -------------- +
1733684 | -264.6 | 1723382 | -314.84 | 1728106 | 50.55 | 1741636 | -264.6 | (4 rows)
但是当我做
从A选择a_id其中customer_pay = -264.6;
我得到了没有什么。
我尝试了所有可能的精度变化,如-264.60,-264.00等。 此查询精确地为+264.6。 我应该如何选择具有负双精度类型的值。
寻求帮助。
我在Oracle中运行这个,看起来很好。 – sagi
我试着把“”,“'等,在我的postgres中没有任何作品。 – Amal
如果您使用WHERE ROUND(customer_pay)= -264'。它工作吗? – sagi