各大数据库类型与JDBC中介数据类型的转换对比
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
本文由xuan_violet贡献 doc1。 各大数据库类型与 JDBC 中介数据类型的转换对比 各大数据库类型与 JDBC 中介数据类型的转换对比 MYSQL 1 BIGINT(0-255) BIGINT SQL SERVER BIGINT JDBC BIGINT ORACLE NUM BER(1-38,-84127) NUMBER(1-38) NUMBER 2 BINARY(0-255) BINARY VARBINARY(0-8 000) BINARY(1-8000) BINARY BINARY RAW(1-2000) LONG RAW CHAR(1-255) FOR BIT DATA VARCHAR(1-32 672) FOR BIT DATA BINARY(1-8000) BIT BIT RAW(1-2000) CH AR(1-255) FOR BIT DATA DB2 BIGINT 3 BIT(0-64) BIT 4 5 LONGBLOB CHAR(0-255) CHAR VARCHAR(0-800 0) IMAGE CHAR(1-8000) CHAR NCHAR(1-4000) NCHAR BLOB CHAR BLOB CHAR(1-2000) CHAR NCHAR(1-1000) NCHAR LONG BLOB CHAR(1-254) VARCHAR(1-32 672) CHAR 6 LONGTEXT NTEXT TEXT CLOB CLOB CLOB 7 8 DATE DECIMAL (0-65,0-30) DECIMAL (0-65) DECIMAL DATETIME DATETIME(1-38, 0-38) DATETIME(1-38) DATETIME FLOAT(1-53) FLO AT DATE DECIMAL DATE NUMBER(1-38,-84127) NUMBER(1-38) NUMBER DATE DECIMAL (1-31,0-31) DECIMAL (1-31) DECIMAL DOUBLE 9 DOUBLE(0-255, 0-30) DOUBLE NUMBER(1-38,-84127) DOUBLE NUMBER(1-38) NUMBER 1 0 FLOAT(0-255,030) FLOAT(0-53) FLOAT(1-53) FLOAT FLOAT FLOAT(1-126) FLOAT DECIMAL (1-31,0-31) DECIMAL (1-31) DECIMAL 1 1 INTEGER(0-255) INTEGER INT INTEGER NUMBER(1-38,-84127) NUMBER(1-38) NUMBER INTEGER 1 2 LONG VARBINARY IMAGE LONGVARBIN ARY
page 3
paபைடு நூலகம்e 1
LONG RAW LONG VARCHAR FOR BIT DATA 1 3 1 4 LONG VARCHAR NUMERIC(0-65, 0-30) NUMERIC(0-65) NUMERIC NTEXT LONGVARCHA R LONG LONG VARCHAR NUMERIC(1-38,0 -38) NUMERIC(1-38) NUMERIC REAL NUMERIC NUMBER(1-38,-84127) NUMBER(1-38) NUMBER DECIMAL (1-31,0-31) DECIMAL (1-31) DECIMAL REAL 1 5 FLOAT(0-255,030) FLOAT(0-53) FLOAT REAL NUMBER(1-38,-84127) NUMBER(1-38) NUMBER 1 6 SMALLINT(0-255 ) SMALLINT SMALLINT SMALLINT NUMBER(1-38,-84127) NUMBER(1-38) NUMBER SMALLINT 1 7 TIME DATETIME DATETIME TIMESTAMP TINYINT(0-255) DATETIME TIME TIMESTAMP TIME 1 8 DATETIME TIMESTAMP TIMESTAMP TIMESTAMP 1 TINYINT TINYINT NUMBER(1-38,-84- SMALLINT 9 TINYINT 127) NUMBER(1-38) NUMBER 2 0 VARBINARY(0-8 000) LONG VARBINARY VARBINARY(1-80 00) VARBINARY IMAGE VARBINARY RAW(1-2000) LONG RAW VARCHAR(1-32 672) FOR BIT DATA LONG VARCHAR FOR BIT DATA 2 1 VARCHAR(0-800 0) LONG VARCHAR VARCHAR(1-800 0) VARCHAR NVARCHAR(1-40 00) NVARCHAR NTEXT VARCHAR VARCHAR2(1-400 0) NVARCHAR2(1-20 00) LONG
page 2
VARCHAR(1-32 672) LONG VARCHAR MYSQL SQL SERVER JDBC ORACLE DB2 JDBC 1 BIGINT ORACLE NUMBER(1-38,-84-127) NUMBER(1-38) NUMBER BIGINT DB2 SYBASE BIGINT 2 BINARY RAW(1-2000) LONG RAW CHAR(1-255) FOR BIT DATA VARCHAR(1-32672) FOR BIT DATA BINARY 3 BIT RAW(1-2000) CHAR(1-255) FOR BIT DATA BIT 4 5 BLOB CHAR BLOB CHAR(1-2000) CHAR NCHAR(1-1000) BLOB CHAR(1-254) VARCHAR(1-32672) CHAR BLOB CHAR NCHAR UNICHAR NCHAR LONG 6 7 8 CLOB DATE DECIMAL CLOB DATE NUMBER(1-38,-84-127) NUM BER(1-38) NUMBER 9 DOUBLE NUMBER(1-38,-84-127) NUMBER(1-38) NUMBER 10 FLOA T FLOAT(1-126) FLOAT DECIMAL (1-31,0-31) DECIMAL (1-31) DECIMAL 11 INTEGER NUMBER(1-38,-84-127) NUMBER(1-38) NUMBER 12 13 14 LONGVARBINARY LONGVARCH AR NUMERIC LONG RAW LONG NUMBER(1-38,-84-127) NUMBER(1-38) NUMBER 15 REAL NUMBER(1-38,-84-127) NUMBER(1-38) NUMBER 16 SMALLINT NUMBER(1-38,-84-127) NUMBER(1-38) NUMBER 17 18 TIME TIMESTAMP TIMESTAMP TIMESTAMP TIME TIMESTAM P TIME DATETIME SMALLINT SMALLINT LONG VARCHAR FOR BIT DATA LONG VARCHAR D ECIMAL (1-31,0-31) DECIMAL (1-31) DECIMAL REAL REAL IMAGE TEXT NUMERIC INT EGER INT FLOAT CLOB DATE DECIMAL (1-31,0-31) DECIMAL (1-31) DECIMAL DOUBLE CLOB DATE DECIMAL MONEY SMALLMONEY DOUBLE SMALLDATETIME 19 TINYINT NUMBER(1-38,-84-127) NUMBER(1-38) NUMBER 20 VARBINARY RAW(1-2000) LONG RAW VARCHAR(1-32672) FOR BIT DATA LONG VARCHAR FOR BIT DATA 21 VARCHAR VARCHAR2(1-4000) NVARCHAR2(1-2000) LONG VARCHAR(1- 32672) LONG VARCHAR NVARCHAR SYSNAME VARCHAR UNIVARCHAR JDBC ORACLE DB2 SY BASE TIMESTAMP VARBINARY SMALLINT TINYINT
page 3
paபைடு நூலகம்e 1
LONG RAW LONG VARCHAR FOR BIT DATA 1 3 1 4 LONG VARCHAR NUMERIC(0-65, 0-30) NUMERIC(0-65) NUMERIC NTEXT LONGVARCHA R LONG LONG VARCHAR NUMERIC(1-38,0 -38) NUMERIC(1-38) NUMERIC REAL NUMERIC NUMBER(1-38,-84127) NUMBER(1-38) NUMBER DECIMAL (1-31,0-31) DECIMAL (1-31) DECIMAL REAL 1 5 FLOAT(0-255,030) FLOAT(0-53) FLOAT REAL NUMBER(1-38,-84127) NUMBER(1-38) NUMBER 1 6 SMALLINT(0-255 ) SMALLINT SMALLINT SMALLINT NUMBER(1-38,-84127) NUMBER(1-38) NUMBER SMALLINT 1 7 TIME DATETIME DATETIME TIMESTAMP TINYINT(0-255) DATETIME TIME TIMESTAMP TIME 1 8 DATETIME TIMESTAMP TIMESTAMP TIMESTAMP 1 TINYINT TINYINT NUMBER(1-38,-84- SMALLINT 9 TINYINT 127) NUMBER(1-38) NUMBER 2 0 VARBINARY(0-8 000) LONG VARBINARY VARBINARY(1-80 00) VARBINARY IMAGE VARBINARY RAW(1-2000) LONG RAW VARCHAR(1-32 672) FOR BIT DATA LONG VARCHAR FOR BIT DATA 2 1 VARCHAR(0-800 0) LONG VARCHAR VARCHAR(1-800 0) VARCHAR NVARCHAR(1-40 00) NVARCHAR NTEXT VARCHAR VARCHAR2(1-400 0) NVARCHAR2(1-20 00) LONG
page 2
VARCHAR(1-32 672) LONG VARCHAR MYSQL SQL SERVER JDBC ORACLE DB2 JDBC 1 BIGINT ORACLE NUMBER(1-38,-84-127) NUMBER(1-38) NUMBER BIGINT DB2 SYBASE BIGINT 2 BINARY RAW(1-2000) LONG RAW CHAR(1-255) FOR BIT DATA VARCHAR(1-32672) FOR BIT DATA BINARY 3 BIT RAW(1-2000) CHAR(1-255) FOR BIT DATA BIT 4 5 BLOB CHAR BLOB CHAR(1-2000) CHAR NCHAR(1-1000) BLOB CHAR(1-254) VARCHAR(1-32672) CHAR BLOB CHAR NCHAR UNICHAR NCHAR LONG 6 7 8 CLOB DATE DECIMAL CLOB DATE NUMBER(1-38,-84-127) NUM BER(1-38) NUMBER 9 DOUBLE NUMBER(1-38,-84-127) NUMBER(1-38) NUMBER 10 FLOA T FLOAT(1-126) FLOAT DECIMAL (1-31,0-31) DECIMAL (1-31) DECIMAL 11 INTEGER NUMBER(1-38,-84-127) NUMBER(1-38) NUMBER 12 13 14 LONGVARBINARY LONGVARCH AR NUMERIC LONG RAW LONG NUMBER(1-38,-84-127) NUMBER(1-38) NUMBER 15 REAL NUMBER(1-38,-84-127) NUMBER(1-38) NUMBER 16 SMALLINT NUMBER(1-38,-84-127) NUMBER(1-38) NUMBER 17 18 TIME TIMESTAMP TIMESTAMP TIMESTAMP TIME TIMESTAM P TIME DATETIME SMALLINT SMALLINT LONG VARCHAR FOR BIT DATA LONG VARCHAR D ECIMAL (1-31,0-31) DECIMAL (1-31) DECIMAL REAL REAL IMAGE TEXT NUMERIC INT EGER INT FLOAT CLOB DATE DECIMAL (1-31,0-31) DECIMAL (1-31) DECIMAL DOUBLE CLOB DATE DECIMAL MONEY SMALLMONEY DOUBLE SMALLDATETIME 19 TINYINT NUMBER(1-38,-84-127) NUMBER(1-38) NUMBER 20 VARBINARY RAW(1-2000) LONG RAW VARCHAR(1-32672) FOR BIT DATA LONG VARCHAR FOR BIT DATA 21 VARCHAR VARCHAR2(1-4000) NVARCHAR2(1-2000) LONG VARCHAR(1- 32672) LONG VARCHAR NVARCHAR SYSNAME VARCHAR UNIVARCHAR JDBC ORACLE DB2 SY BASE TIMESTAMP VARBINARY SMALLINT TINYINT