What are the data types supported by JDBC?

JDBCJava 8MySQLMySQLi Database

JDBC provides support for almost all the SQL datatypes Whenever the JDBC driver receives a call from a Java application it converts the Java datatypes in it to the corresponding SQL data types. The conversion process follows default mapping. Following is the list of data types supported by JDBC and their corresponding SQL datatypes.

SQLJDBC/Java
VARCHARjava.lang.String
CHARjava.lang.String
LONGVARCHARjava.lang.String
BITboolean
NUMERICjava.math.BigDecimal
TINYINTbyte
SMALLINTshort
INTEGERint
BIGINTlong
REALfloat
FLOATfloat
DOUBLEdouble
VARBINARYbyte[ ]
BINARYbyte[ ]
DATEjava.sql.Date
TIMEjava.sql.Time
TIMESTAMPjava.sql.Timestamp
CLOBjava.sql.Clob
BLOBjava.sql.Blob
ARRAYjava.sql.Array
REFjava.sql.Ref
STRUCTjava.sql.Struct
raja
Published on 22-Mar-2019 15:23:58
Advertisements