JDBC BigDecimal - Precision Issue

1.4k Views Asked by At

When reading a decimal value with 12 digits after decimal point from a table using resultSet.getBigDecimal("COL1") it returns the value with some additional numbers at the end. For instance, the value on the table is 29963.26, but the value returned by rs.getBigDecimal and rs.getString is 29963.260000000002

Another example, value on the table is 26.76 but the value returned by rs.getBigDecimal('COL') is 26.759999999998

Any suggestions to get over it?

0

There are 0 best solutions below