티스토리 뷰

Computer/Databases

[MSSQL 2005] DataBase Type to Java Type Mapping

인생이글케쉬우냐 2009. 9. 14. 12:18
[출처 : http://blog.naver.com/kyong94s/87833070]
java.sql.Types value Java type IBM DB2 Oracle Sybase SQL Informix®
BIGINT java.lang.long BIGINT NUMBER (38, 0) BIGINT BIGINT INT8
BINARY byte[] CHAR FOR BIT DATA RAW BINARY IMAGE BYTE
BIT java.lang.Boolean N/A BIT BIT BIT BIT
BLOB byte[] BLOB BLOB BLOB BLOB BLOB
CHAR java.lang.String CHAR, GRAPHIC CHAR CHAR CHAR CHAR
CLOB java.lang.String CLOB, DBCLOB CLOB CLOB CLOB CLOB
DATE java.sql.Date DATE DATE DATE DATE DATE
DECIMAL java.math.BigDecimal DECIMAL NUMBER DECIMAL, MONEY, SMALLMONEY DECIMAL DECIMAL
DOUBLE java.lang.Double DOUBLE DOUBLE PRECISION DOUBLE PRECISION DOUBLE PRECISION DOUBLE PRECISION
FLOAT java.lang.Double FLOAT FLOAT FLOAT FLOAT FLOAT
INTEGER java.lang.Integer INTEGER INTEGER INT INTEGER INTEGER
JAVA_OBJECT java.lang.Object JAVA_OBJECT JAVA_OBJECT JAVA_OBJECT JAVA_OBJECT OPAQUE
LONGVARBINARY byte[] LONG VARCHAR FOR BIT DATA LONG RAW IMAGE IMAGE BYTE
LONGVARCHAR java.lang.String LONG VARCHAR, LONG VARGRAPHIC LONG TEXT TEXT TEXT
NUMERIC java.math.BigDecimal NUMERIC NUMBER NUMERIC NUMERIC NUMERIC
OTHER java.lang.Object OTHER OTHER OTHER OTHER OTHER
REAL java.lang.Float REAL REAL REAL REAL REAL
SMALLINT java.lang.Integer SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT
TIME java.sql.Time TIME DATE TIME TIME DATETIME HOUR TO SECOND
TIMESTAMP java.sql.Timestamp TIMESTAMP DATE DATETIME, SMALLDATETIME DATETIME DATETIME YEAR TO FRACTION (5)
TINYINT java.lang.Bute SMALLINT

TINYINT

TINYINT

TINYINT TINYINT
VARBINARY byte[] VARCHAR FOR BIT DATA RAW VARBINARY IMAGE BYTE
VARCHAR java.lang.String VARCHAR, VARGRAPHIC VARCHAR VARCHAR VARCHAR VARCHAR
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.
 
 
아래는 Cator Prj. 홈에서 퍼온 내용이다.
 
참고로 Castor  는 open source 데이터 바인딩 프레임웍이라 한다. (자세히 보진 못해서...)

Type Mapping

This section describes the mapping between Castor sql type java.sql.Types constant, java data type, sql type of supported database.


Castor Type JDBC Type Java Object Type MySQL PostgreSQL Oracle Derby MSSQL SapDB DB2 Sybase HSQL PointBase
BIT BIT java.lang.Boolean TINYINT(1) BOOLEAN BOOLEAN CHAR FOR BIT DATA BIT BOOLEAN
BIT BIT BOOLEAN
TINYINT TINYINT java.lang.Byte TINYINT SMALLINT SMALLINT SMALLINT TINYINT SMALLINT SMALLINT TINYINT TINYINT SMALLINT
SMALLINT SMALLINT java.lang.Short SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT SMALLINT
INTEGER INTEGER java.lang.Integer INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER
BIGINT BIGINT java.lang.Long BIGINT BIGINT NUMERIC BIGINT BIGINT INTEGER BIGINT INTEGER BIGINT NUMERIC
FLOAT FLOAT java.lang.Double FLOAT DOUBLE PRECISION FLOAT FLOAT FLOAT FLOAT FLOAT FLOAT FLOAT FLOAT
DOUBLE DOUBLE java.lang.Double DOUBLE DOUBLE PRECISION DOUBLE PRECISION DOUBLE DOUBLE PRECISION DOUBLE PRECISION DOUBLE DOUBLE PRECISION DOUBLE PRECISION DOUBLE PRECISION
REAL REAL java.lang.Float REAL REAL REAL REAL REAL DOUBLE PRECISION REAL REAL REAL REAL
NUMERIC NUMERIC java.math.BigDecimal NUMERIC NUMERIC NUMERIC NUMERIC NUMERIC NUMERIC NUMERIC NUMERIC NUMERIC NUMERIC
DECIMAL DECIMAL java.math.BigDecimal DECIMAL NUMERIC DECIMAL DECIMAL DECIMAL DECIMAL DECIMAL DECIMAL DECIMAL DECIMAL
CHAR CHAR java.lang.String CHAR CHAR CHAR CHAR CHAR CHAR CHAR CHAR CHAR CHAR
VARCHAR VARCHAR java.lang.String VARCHAR VARCHAR VARCHAR2 VARCHAR VARCHAR VARCHAR VARCHAR VARCHAR VARCHAR VARCHAR
DATE DATE java.sql.Date DATE DATE DATE DATE DATETIME DATE DATE DATETIME DATE DATE
TIME TIME java.sql.Time TIME TIME DATE TIME DATETIME TIME TIME DATETIME TIME TIME
TIMESTAMP TIMESTAMP java.sql.Timestamp TIMESTAMP TIMESTAMP TIMESTAMP TIMESTAMP TIMESTAMP TIMESTAMP TIMESTAMP TIMESTAMP TIMESTAMP TIMESTAMP
BINARY BINARY byte[] BINARY BYTEA RAW CHAR [n] FOR BIT DATA BINARY BLOB CHAR [n] FOR BIT DATA BINARY BINARY BLOB
VARBINARY VARBINARY byte[] VARBINARY BYTEA LONG RAW VARCHAR [] FOR BIT DATA VARBINARY BLOB VARCHAR [] FOR BIT DATA VARBINARY VARBINARY BLOB
LONGVARBINARY LONGVARBINARY byte[] VARBINARY BYTEA LONG RAW LONG VARCHAR FOR BIT DATA IMAGE BLOB LONG VARCHAR FOR BIT DATA VARBINARY LONGVARBINARY BLOB
OTHER OTHER java.lang.Object BLOB BYTEA BLOB BLOB IMAGE BLOB BLOB IMAGE OTHER BLOB
JAVA_OBJECT JAVA_OBJECT java.lang.Object BLOB BYTEA BLOB BLOB IMAGE BLOB BLOB IMAGE OBJECT BLOB
BLOB BLOB java.io.InputStream BLOB BYTEA BLOB BLOB IMAGE BLOB BLOB IMAGE OBJECT BLOB
CLOB CLOB java.sql.Clob TEXT TEXT CLOB CLOB TEXT CLOB CLOB TEXT OBJECT CLOB

JDBC Types not supported by Castor

The following JDBC types are not supported by Castor yet and can therefore not been found in above table.


- ARRAY
- DISTICT
- REF
- STRUCT
반응형

'Computer > Databases' 카테고리의 다른 글

[MSSQL] REPLACE  (0) 2009.09.23
[SQL문] INSERT INTO SELECT문  (0) 2009.09.16
[MSSQL 2005] SET ANSI_NULLS ON  (0) 2009.09.14
[MSSQL 2005] SET QUOTED_IDENTIFIER  (0) 2009.09.14
[MSSQL 2005] SET ANSI_NULLS  (0) 2009.09.14