I have connected Java program to Oracle database using JDBC. I want to store BigInteger values(512 bits) in the database. What should be the type of the column?
Both BigInteger and BigDecimal extend java.lang.Number, however this does not mean that you can cast from BigInteger up to Number then down to BigDecimal.
There is a constructor in BigDecimal that takes a BigInteger, so try: