Domanda

I have a column in MySQL db and its data type is decimal(6,6). Now in order to store data in that column what data type i should take in Java? Now I tried using double, float, and BigDecimal, nothing works for me?

È stato utile?

Soluzione

According to the MySQL official reference (Connector/J JDBC Reference) the DECIMAL type is mapped to java.math.BigDecimal. Also see the 25.4.4.3. Java, JDBC and MySQL Types.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top