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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top