Java External SP: data type mapping

Page 96.

SQL data type Java type (JAVA parameter style) Java type (DB2GENERAL parameter style)
SMALLINT short (NULL NOT ALLOWED) short
INTEGER int (NULL NOT ALLOWED) int
BIGINT long (NULL NOT ALLOWED)  long
DECIMAL(p, s) BigDecimal (Nullable) BigDecimal
NUMERIC(p, s) BigDecimal (Nullable) BigDecimal
REAL or FLOAT(p) float (NULL NOT ALLOWED) float
DOUBLE PRECISION or FLOAT or FLOAT(p) double (NULL NOT ALLOWED) double
CHARACTER(n) String (Nullable) String
VARCHAR(n) String (Nullable)  String
VARCHAR(n) FOR BIT DATA N/A com.ibm.db2.app.Blob
GRAPHIC(n) String (Nullable) String
VARGRAPHIC(n) String (Nullable) String
DATE  Date(Nullable) String
TIME Time(Nullable) String
TIMESTAMP Timestamp (Nullable) String
CLOB N/A com.ibm.db2.app.Clob
BLOB N/A  com.ibm.db2.app.Blob
DBCLOB  N/A  com.ibm.db2.app.Clob

 

Leave a Reply

Your email address will not be published. Required fields are marked *