Web back-end notes SQL Server corresponds to Java data types

Source: Internet
Author: User

numbering Database Type JDBC Type JDBC Index Description
1 Int Java.lang.Integer 4
2 varchar Java.lang.String 12
3 Char Java.lang.String 1
4 NChar Java.lang.String 1
5 nvarchar Java.lang.String 12
6 Text Java.lang.String -1
7 ntext Java.lang.String -1
8 tinyint Java.lang.Integer -6
9 Int Java.lang.Integer 4
10 tinyint Java.lang.Integer -6
11 smallint Java.lang.Integer 5
12 Bit Java.lang.Boolean -7
13 bigint Java.lang.Long -5
14 Float Java.lang.Double 6
15 Decimal Java.math.BigDecimal 3
16 Money Java.math.BigDecimal 3
17 SmallMoney Java.math.BigDecimal 3
18 Numeric Java.math.BigDecimal 2
19 Real Java.lang.Float 7
20 uniqueidentifier Java.lang.String 1
21st smalldatetime Java.sql.Timestamp 93
22 Datetime Java.sql.Timestamp 93
23 Timestamp Byte[] -2
24 Binary Byte[] -2
25 varbinary Byte[] -3
26 Image Byte[] -4
27 sql_variant Java.lang.String 12

Reference Original: http://blog.csdn.net/lg312200538/article/details/5993049

Web back-end notes SQL Server corresponds to Java data types

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.