Oracle number corresponds to Java data type BigDecimal

Source: Internet
Author: User

The recent database query encountered a problem, the database is a number Type field, in the Java type corresponding to have an integer and BigDecimal will appear;

The test found that when the database is SQL Server and DB2, the integer type is taken out with GetObject (), but the Oracle takes out an integer or BigDecimal type. The reason is that Oracle and Java type corresponds to number length, the following reference to Baidu Library @skycity521 library encountered this type of problem, to determine the length of each database and database field different Java data type is too cumbersome, can use GetString () to take the value, unified first into a string to determine the other attached java.sql.Types, database field type, Java data type of the corresponding relationship http://www.cnblogs.com/shishm/ Archive/2012/01/30/2332142.html

Oracle number corresponds to Java data type BigDecimal

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.