https://blog.csdn.net/michaelzhou224/article/details/16827029
Mysql |
Oracle |
Java |
BIGINT |
NUMBER(19,0) |
java.lang.Long |
BIT |
RAW |
byte[] |
BLOB |
BLOB RAW |
byte[] |
CHAR |
CHAR |
java.lang.String |
DATE |
DATE |
java.sql.Date |
DATETIME |
DATE |
java.sql.Timestamp |
DECIMAL |
FLOAT (24) |
java.math.BigDecimal |
DOUBLE |
FLOAT (24) |
java.lang.Double |
DOUBLE PRECISION |
FLOAT (24) |
java.lang.Double |
ENUM |
VARCHAR2 |
java.lang.String |
FLOAT |
FLOAT |
java.lang.Float |
INT |
NUMBER(10,0) |
java.lang.Integer |
INTEGER |
NUMBER(10,0) |
java.lang.Integer |
LONGBLOB |
BLOB RAW |
byte[] |
LONGTEXT |
CLOB RAW |
java.lang.String |
MEDIUMBLOB |
BLOB RAW |
byte[] |
MEDIUMINT |
NUMBER(7,0) |
java.lang.Integer |
MEDIUMTEXT |
CLOB RAW |
java.lang.String |
NUMERIC |
NUMBER |
|
REAL |
FLOAT (24) |
|
SET |
VARCHAR2 |
java.lang.String |
SMALLINT |
NUMBER(5,0) |
java.lang.Integer |
TEXT |
VARCHAR2 CLOB |
java.lang.String |
TIME |
DATE |
java.sql.Time |
TIMESTAMP |
DATE |
java.sql.Timestamp |
TINYBLOB |
RAW |
byte[] |
TINYINT |
NUMBER(3,0) |
java.lang.Boolean |
TINYTEXT |
VARCHAR2 |
java.lang.String |
VARCHAR |
VARCHAR2 CLOB |
java.lang.String |
YEAR |
NUMBER |
java.sql.Date(日期设为2月1日晚上2点) |