SQL type
|
Java type
|
Notes
|
CHAR
|
String
|
Fixed length string of characters
|
VARCHAR
|
String
|
Variable length string of characters
|
LONGVARCHAR
|
String java.io.InputStream
|
Any length (multi-megabyte) strings
|
NUMERIC
|
java.math.BigDecimal
|
Absolute precision decimal values
|
DECIMAL
|
java.math.BigDecimal
|
Absolute precision decimal value
|
BIT
|
Boolean
|
Single bit/binary value (on or off)
|
TINYINT
|
Byte
|
8-bit integer
|
SMALLINT
|
Short
|
16-bit integer
|
INTEGER
|
Integer
|
Signed 32-bit integer
|
BIGINT
|
Long
|
Signed 64-bit integer
|
REAL
|
Float
|
Floating-point value
|
FLOAT
|
Float
|
Floating-point value
|
DOUBLE
|
Double
|
Large floating-point value
|
BINARY
|
byte[]
|
Array of binary values
|
VARBINARY
|
byte[]
|
Variable length array of binary values
|
LONGVARBINARY
|
byte[]
|
Any length (multi-megabyte) array of binary values
|
DATE
|
java.sql.Date
|
Date value
|
TIME
|
java.sql.Time
|
Time value
|
TIMESTAMP
|
java.sql.Timestamp
|
Time value with additional nanosecond field
|