JAVA数据类型与DB2OracleSybase以及SQL Server对应关系
Posted 睡猪遇上狼
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了JAVA数据类型与DB2OracleSybase以及SQL Server对应关系相关的知识,希望对你有一定的参考价值。
java.sql.Types | Java | IBM DB2 | Oracle | Sybase | SQL-SERVER |
BIGINT | java.lang.long | BIGINT | NUMBER (38, 0) | BIGINT | BIGINT |
BINARY | byte[] | CHAR FOR BIT DATA | RAW | BINARY | IMAGE |
BIT | java.lang.Boolean | N/A | BIT | BIT | BIT |
BLOB | byte[] | BLOB | BLOB | BLOB | BLOB |
CHAR | java.lang.String | CHAR, GRAPHIC | CHAR | CHAR | CHAR |
CLOB | java.lang.String | CLOB, DBCLOB | CLOB | CLOB | CLOB |
DATE | java.sql.Date | DATE | DATE | DATE | DATE |
DECIMAL | java.math.BigDecimal | DECIMAL | NUMBER | DECIMAL, MONEY, SMALLMONEY | DECIMAL |
DOUBLE | java.lang.Double | DOUBLE | DOUBLE PRECISION | DOUBLE PRECISION | DOUBLE PRECISION |
FLOAT | java.lang.Double | FLOAT | FLOAT | FLOAT | FLOAT |
INTEGER | java.lang.Integer | INTEGER | INTEGER | INT | INTEGER |
JAVA_OBJECT | java.lang.Object | JAVA_OBJECT | JAVA_OBJECT | JAVA_OBJECT | JAVA_OBJECT |
LONGVARBINARY | byte[] | LONG VARCHAR FOR BIT DATA | LONG RAW | IMAGE | IMAGE |
LONGVARCHAR | java.lang.String | LONG VARCHAR, LONG VARGRAPHIC | LONG | TEXT | TEXT |
NUMERIC | java.math.BigDecimal | NUMERIC | NUMERIC | NUMERIC | NUMERIC |
OTHER | java.lang.Object | OTHER | OTHER | OTHER | OTHER |
REAL | java.lang.Float | REAL | REAL | REAL | REAL |
SMALLINT | java.lang.Integer | SMALLINT | SMALLINT | SMALLINT | SMALLINT |
TIME | java.sql.Time | TIME | DATE | TIME | TIME |
TIMESTAMP | java.sql.Timestamp | TIMESTAMP | DATE | DATETIME, SMALLDATETIME | DATETIME |
TINYINT | java.lang.Bute | SMALLINT | TINYINT | TINYINT | TINYINT |
VARBINARY | byte[] | VARCHAR FOR BIT DATA | RAW | VARBINARY | IMAGE |
VARCHAR | java.lang.String | VARCHAR, VARGRAPHIC | VARCHAR | VARCHAR | VARCHAR |
以上是关于JAVA数据类型与DB2OracleSybase以及SQL Server对应关系的主要内容,如果未能解决你的问题,请参考以下文章