Q:

Java ResultSet.getBigDecimal() scale issue with Oracle

Using Oracle 11g.
Reading a number(18, 8) column from it using JDBC ResultSet.getBigDecimal(columnName) - the value is 1, and that is what is returned. However, I want it to return 1.00000000.
Is there a way to get that? I tried ResultSet.getBigDecimal(columnName, 8) (I know it's deprecated, but wanted to try it anyway). Did not work.

A:

This may be the solution:
ResultSet.getBigDecimal(columnName).setScale(8);

