Java and database type comparison table

Source: Internet
Author: User
Tags comparison table

Database type Java type
INTEGER int or Java.lang.Integer
BIGINT Long or Java.lang.Long
SMALLINT Short or Java.lang.Short
FLOAT float or java.lang.Float
DOUBLE Double or java.lang.Double
NUMERIC Java.math.BigDecimal
CHAR Java.lang.String
VARCHAR Java.lang.String
TINYINT byte or Java.lang.Byte
BIT Boolean or Java.lang.Boolean
DATE Java.util.Date or Java.sql.Date
Time Java.util.Date or Java.sql.Time
TIMESTAMP Java.util.Date or Java.sql.Timestamp
TIMESTAMP Java.util.Calendar
DATE Java.util.Calendar
VARBINARY (or BLOB) Byte[]
Clob Java.lang.String
VARBINARY (or BLOB) Any Java class that implements Java.io.Serializable
Clob Java.sql.Clob
Blob Java.sql.Blob

Java and database type comparison table

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.