티스토리 뷰

The following table lists the default mappings between the basic SQL Server, JDBC, and Java programming language data types


SQL Server Types JDBC Types (java.sql.Types) Java Language Types
bigint BIGINT long
binary BINARY byte[]
bit BIT boolean
char CHAR String
date DATE java.sql.Date
datetime TIMESTAMP java.sql.Timestamp
datetime2 TIMESTAMP java.sql.Timestamp
datetimeoffset (2) microsoft.sql.Types.DATETIMEOFFSET microsoft.sql.DateTimeOffset
decimal DECIMAL java.math.BigDecimal
float DOUBLE double
image LONGVARBINARY byte[]
int INTEGER int
money DECIMAL java.math.BigDecimal
nchar CHAR String
  NCHAR (Java SE 6.0)  
ntext LONGVARCHAR String
  LONGNVARCHAR (Java SE 6.0)  
numeric NUMERIC java.math.BigDecimal
nvarchar VARCHAR String
  NVARCHAR (Java SE 6.0)  
nvarchar(max) VARCHAR String
  NVARCHAR (Java SE 6.0)  
real REAL float
smalldatetime TIMESTAMP java.sql.Timestamp
smallint SMALLINT short
smallmoney DECIMAL java.math.BigDecimal
text LONGVARCHAR String
time TIME (1) java.sql.Time (1)
timestamp BINARY byte[]
tinyint TINYINT short
udt VARBINARY byte[]
uniqueidentifier CHAR String
varbinary VARBINARY byte[]
varbinary(max) VARBINARY byte[]
varchar VARCHAR String
varchar(max) VARCHAR String
xml LONGVARCHAR String
  LONGNVARCHAR (Java SE 6.0) SQLXML



[출처] http://msdn.microsoft.com/en-us/library/ms378878.aspx


댓글