سؤال

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